How to Solve a “Fatal Error: Allowed Memory Size Exhausted” Problem

You can add some incredible functionality to WordPress by installing plug-ins.  If you run a quick Google search you will find where WordPress power users have posted lists of “essential” plug-ins.

The law of conservation of energy being what it is, however, you give up speed as you add more plug-ins.  As a rule, a site running 10 plug-ins will be faster and more stable than a site running 25 plug-ins.

In addition, some plug-ins do not play well together, and, worse, some plug-ins are poorly coded and will hog resources.  For example, there is a really useful plugin called Broken Link checker, but activated using certain configurations can really slow your site down.

If you have plug-ins that are memory hogs or that do not play well with other plug-ins, you may get an error message that looks something like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/pepdealc/public_html/wp-content/plugins/seo-ultimate/plugin/class.seo-ultimate.php on line 576.

This error will appear on a blank page and will not allow you to go back into your WordPress dashboard.

Basically this error means that your site host is not allocating enough memory on your server account to allow both WordPress and all of your plug-ins to work.

You can solve this problem in a number of ways:

1.  if you have FTP access to your account you can manually delete plug-ins one by one  until the error disappears

2. you can edit your wp-config.php file by adding a line immediately after the first <@php:

define('WP_MEMORY_LIMIT', '64M');

if 64M does not work, try 128M

3. you can edit the .htaccess file by adding the following line:

php_value memory_limit 64M

(here, too, try 128M if 64M does not work)

4. you can edit the memory_limit line in your php.ini (if you have access to that file) to 64M:

memory_limit = 64M; 

(here, too, try 128M if 64M does not work)

5. if you are not comfortable editing WordPress files, then, of course, call your hosting company.

For more information see this post on the official WordPress forum.


0 comments… add one

Leave a Comment