After changing webhosting, I encountered this error message everytime I tried to upgrade my WordPress blog:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516357 bytes)
I am searching hard around the web but didn’t really find the solution. Most of the article gives the same solution that won’t work for me..
Solution 1: Modify your php.ini file
The PHP.INI file can be found in your root directory, usually in /public_html/ directory. Open PHP.INI file and –
Find:
memory_limit = 12M
… change to 32M or higher
Before the new settings could take effect, it is necessary to restart your server.
Solution 2: Add code to your WordPress /wp-admin/install.php file.
Open your /wp-admin/install.php file and add the following code directly under the
ini_set(‘memory_limit’,’32M’);
Then, re-install your WordPress blog using the same database.
Solution 3. Add this line of code in your WordPress WP-CONFIG.PHP file. Add it before any other values.
define(‘WP_MEMORY_LIMIT’, ’64M’);
Try to increase it to 64M if 32M seems to be insufficient.
The only solution to resolve this fatal error that really work is..
Solution 4. In the WP base directory, Open wp-settings.php ,
find this..
if ( !defined(‘WP_MEMORY_LIMIT’) )
define(‘WP_MEMORY_LIMIT’, ‘32M‘);
The file installs with 32MB as the default.
Change it to 64MB or 128MB..!!
define(‘WP_MEMORY_LIMIT’, ‘64M‘);
Its work for me..and maybe you too!!
solution 3 work for me.
thank you very much…
oh…good work.good sharing 1nfo.TQ
This sorted me, thanks!
Thanks man, the solution 4 work for me.