Ways To Increase PHP Memory Limit For WordPress
If you are a blogger or webmaster and use WordPress then you must have faced Fatal Error due to memory issues in other words less memory problem. This memory problem in WordPress arises due to some plugins or sometimes due to the use of excessive number of plugins.
Such types of memory issue in WordPress arises due to the limitation of PHP memory of your server hosting. Generally the hosting server PHP memory is set to a limit which is some time not sufficient to complete some type of process and thus leaves behind a Fatal Error. This article will explain you the way to increase PHP memory for WordPress site. So lets walk through the ways to increase the PHP memory.
How to fix WordPress memory issues
1. Increasing the memory limit via PHP .ini file
If you have access to PHP .ini file you can increase the memory limit directly. Open the php.ini file and find memory_limit and set the value to 64M or 128M if it is less.
memory_limit = 64M
2. Increase PHP memory limit via .htaccess file
In case you do not have access to php.ini file then you can also increase the PHP memory limit via .htaccess file. Open your .htaccess and add the below line to it to increase the memory to 64M or 128M.
php_value memory_limit 64M
3. Increase the PHP memory limit via wp-config.php file
You can also increase the PHP memory limit via wp-config.php file of your WordPress installation. Open wp-config.php file and search for “WP_MEMORY_LIMIT” if it is there then change the limit size to 64M or 128M, if it is not present then add the below code
Note: Just follow any one of the step above to increase the PHP memory. Successful implementation of any one of these above process will solve your PHP memory issue, if still you are facing the issue you need to contact your hosting provider and tell them regarding the issue.