While working on WordPress, the most common issue is a PHP Fatal error regarding the allowed memory size of xxxxxxx bytes exhausted visible by any debugging tool. This error is reported by PHP when a PHP file is processing too much load than the set limit. There must be lots of plugins active or the theme you are using is bulky & PHP memory isnt enough to handle these things. There are simple ways of increasing the memory allocation of your website. In this article I’ll show you how to easily Fix Allowed Memory Size Exhausted Error in WordPress.
Fix Allowed Memory Size Exhausted Error in WordPress :
To fix the ‘allowed memory size of xxxxxxxx bytes exhausted’ error, you can follow any of these options.
Option 1. Configure wp-config.php file :
Add the following line to your wp-config.php file:
Option 2. Configure PHP.ini file :
If you have access to your PHP.ini file, change the line in PHP.ini. If your line shows 32M try 64M, If your line shows 64M try 128M.
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
Option 3. Configure .htaccess file:
If you don’t have access to PHP.ini, you can try adding following line code to an .htaccess file:
php_value memory_limit 64M
In the above example, we have set the new allocated memory size as 64M. if you are still seeing the same error, I would suggest to try with 128M and see if it helps.
Note : You can increase to any value you want depending on your needs.
I hope you find this article helpful. Now you can easily Fix Allowed Memory Size Exhausted Error in WordPress. If you have any query or suggestion regarding the same, do share with us.