If you’re using WordPress, it is always a good practice to upgrade to the latest version, in this case, WordPress 3.2.1.

However, I came to realize that web hosting providers, especially those on shared hosting, have a default 8MB or 32MB in terms of PHP memory limit. That means that the maximum memory allocated to run a PHP script is 32MB.

So, if you click on the Automatically Upgrade button in your WordPress dashboard, you’ll see an error message like :

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

The upgrade from WordPress 3.1.x to WordPress 3.2.x is a rather “huge” one. It requires more than 32MB to execute the change.

So how do you upgrade your WordPress to 3.2.x?

Well, one way, a rather recommended way, is to upgrade it manually – http://codex.wordpress.org/Updating_WordPress

Nevertheless, if you insist to click that auto upgrade button (you lazy bum bum, LOL; no prob, I’m like you), there are several ways to do it.

First, try disable all your plugins, the major ones. Try again, and it might work. Hint : But upgrading to WordPress 3.2.x seems to always breach the 32MB memory limit. Alternatively, you can upload a php.ini file (I’ve included the down link here in .txt format; just download and rename it to php.ini) to your root WordPress folder.

Else, you can try increasing the WP_memory_limit  to 64MB in wp-config.php as in http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

Last, but not least, contact your hosting provider to increase your PHP memory limit.

Now, why do hosting providers set such limit. It’s for a good reason to conserve the resources, especially on a shared server. Nevertheless, many of the hosting providers are increasing the limit to 64MB as they realize many of the clients are using WordPress.

Filed under: Web HostingWordPress

Like this post? Subscribe to my RSS feed and get loads more!