Home / Wordpress / How to Resolve Fatal Error: Allowed memory size of 33554432 bytes exhausted in WordPress

How to Resolve Fatal Error: Allowed memory size of 33554432 bytes exhausted in WordPress

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).

Upgrade Error

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.

Wp Config

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.

About Nirmal

Nirmal is a Technology Blogger and a Microsoft MVP in Windows. He can be contacted at nirmal@nirmaltv.com. You can find Nirmal on , and .

2 comments

  1. Great post. Problem solved in 1 minute! Thanx

  2. Obrigado! resolveu o meu problema.

    Thanks! solved my problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>