Wordpress Fatal error: Allowed memory size of xxx bytes exhausted while upgrading Wordpress
You might have received the error stating that “Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate xxxx bytes) in some-file.php on line xxx” while upgrading you Wordpress version. The reason is that while executing PHP file, it exceeds allowed PHP memory on the server. Generally this happens if the value for memory_limit is set to low (probably 8M etc.) in PHP configuration file php.ini. There are some workaround to increase the value for PHP memory.
[1] You can contact your host to raise limit for php_memory.
[2] You can add following line in your .htaccess:
php_value memory_limit 64M
This will not work if suPHP is enabled on your server. If suPHP is enabled on your server then you will need to put php.ini in the root of your domain and modify the following line:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
[3] You can also raise PHP memory from wp-config.php file. Just add the following line after opening PHP tag:
define(‘WP_MEMORY_LIMIT’, ‘64M’);
If the problem still persists, you can contact your host for further assistance.
Kailash Aghera
Related posts:
Tags: PHP memory error in Wordpress, Wordpress Fatal error, Wordpress memory exhausted error, Wordpress upgrade error
Posted under: WordPress Knowledge Base
August 25th, 2009 by Kailash 




Your second option had resolved my problem. After adding the code in .htaccess upgrade worked like charm. Thanks for the article
Thanks, but sometimes 64 MB memory is also not sufficient. If this still not work, you can consult your host and allocate more memory.
I had completed the new installation successfully but then after the page were showing blank page. I followed the instruction provided in this article which resolved my problem. Thanks for providing solutions!
Kevin
Thanks, but sometimes 64 MB memory is also not sufficient. If this still not work, you can consult your host and allocate more memory.
Yes, I needed to set 64 MB due to some plugin installed in my blog.
Yes, I needed to set 64 MB due to some plugin installed in my blog.