Yesterday while upgrading one of our blogs to WordPress version 2.9.1, we encountered an error. The error displayed in the WordPress dashboard was “Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1585313 bytes)”. This error prevented us from upgrading to the latest version of WordPress. This error means that WordPress has run out of memory and needs more memory to run a process than the default PHP setting (usually 12M and in some cases 32M).
In case you are not a WordPress expert or new to WordPress, there is no need to panic, you can solve this error easily following the steps mentioned below.
1. Login to your Host’s FTP Manager or the CPANEL and open the wp-config.php file. This file is located right inside your WordPress installation in your server. You can either open it in any code editor or download a local copy.
2. Once you open the config file, you can see few lines of code which defines your MySQL connection string. Below that add this line of code.
define('WP_MEMORY_LIMIT', '64M');
3. Save the file and now your wp-config file looks similar to the image below.
4. Now open the WordPress dashboard and try upgrading WordPress, the error should not occur now. This error basically happens when WordPress runs out of memory and instead of 64M, you can also try 32M if it works out.
Although there are other ways to fix this error, the fix mentioned above is the simplest and most effective one. If you are still not able to rectify this problem, please do share it in comments.
Great post. Problem solved in 1 minute! Thanx
Obrigado! resolveu o meu problema.
Thanks! solved my problem.