Quantcast

May 20, 2012

Solving the dreaded Fatal error: Allowed memory size of 33554432 bytes exhausted

This was a first. I logged into one blog’s WordPress Administration panel and rather than seeing the Google Analytics summary, recent drafts and other widgets on the Dashboard, I saw this error message in their places:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30566 bytes) in /home/public_html/wp-includes/http.php on line 1033

Fortunately the problem wasn’t really ‘fatal’ (in the usual meaning of the word) and required a very simple fix.

Just edit the wp-config.php file to include the line below:

define(’WP_MEMORY_LIMIT’, ‘64M’);

You can do the same thing by changing the line in your wp-settings.php file from:

if ( !defined(‘WP_MEMORY_LIMIT’) )
define(‘WP_MEMORY_LIMIT’, ’32M’);

to

if ( !defined(‘WP_MEMORY_LIMIT’) )
define(‘WP_MEMORY_LIMIT’, ’64M’);

but the problem will be back the next time you upgrade WordPress, so changing the wp-config.php file is preferable.

About Rosalind Gardner

Rosalind Gardner is a blogger, speaker and Internet Marketing consultant, best known for her "Super Affiliate Handbook", (referred to by industry professionals as the 'bible' of affiliate marketing) and Rosalind Gardner's Academy - a multi-media version of the book.

Comments

  1. That works sometimes – It depends on your hosting… Seems like MOST shared hosting accounts are only giving you a max of about 15 – 20 mb of ram per php process… totally WEAK!

    Unfortunately plugins like the Google sitemap plugin use around 30 mb of memory to generate a site map once you have a few posts in your blog…

    So that’s one thing to ask your host. May CPU time would also be another good one. Most are giving around 30 seconds…

  2. Eyl says:

    I change the wp-config but nothing seems to be change. the dashboard stll showing the fatal error.how to fix this?

Speak Your Mind

*

Disclosure: We are compensated for our reviews. Click here for details.