Have you had a problem in upgrading your WordPress version on a website hosted on 1and1? This problem has been reported on sites hosted on both 1and1.co.uk or 1and1.com, but may occur on sites hosted with other providers too. It occurs when you attempt an automatic upgrade on a working WordPress site to elevate to WordPress 3.0 or greater.
WordPress Update Error
The first thing you know about the problem is an error part way through the automatic update process, which looks something like this:
Fatal error: Out of memory (allocated 28835840) (tried to allocate 3981531 bytes) in [Blog root path]/wp-includes/class-http.php on line 1426
According to numerous postings on other sites, this appears to relate to PHP memory allocation on shared servers, although checking the memory_limit on one of our problem sites using phpinfo() gives a much higher value than the problem scripts appear to require.
The error messages are not always the same, but samples which have been seen include:
- Fatal error: Out of memory (allocated 28835840) (tried to allocate 3981531 bytes) in [Blog root path]/wp-includes/class-http.php on line 1426
- (similar message) in [Blog root path]/wp-admin/admin.php on line 40
- (similar message) in [Blog root path]/wp-admin/includes/media.php on line 268
We host and support a large number of WordPress sites, most of which have upgraded without experiencing this problem. However, where it has occurred it is a challenge, as you should always update WordPress to the latest version to ensure that any security fixes are installed.
After trying a number of suggested cures unsuccessfully, including
- Setting memory_limit = 48M in php.ini (No difference)
- Editing the file with the error to add ini_set(’memory_limit’, ‘48M’); (No difference)
- Adding define(‘WP_MEMORY_LIMIT’, ’64M’); to wp-settings.php. (Yep! No difference)
- Adding a line php_value memory_limit 32M in .htaccess file (Which causes a fatal Internal Server Error)
WordPress Update Out Of Memory Error Solution
The fix for the WordPress Out Of Memory Error, on the problem site at least, was to disable all the installed plugins, and then carry out the automatic upgrade again. This time it ran like a dream, and the site was back in order once the plugins had been re-enabled, with WordPress 3.2.1 installed.
The only regret in finding the solution is that we did not disable the plugins one at a time, in order to see which one was the trigger. However, on a working site with a large following, that extra delay it did not seem appropriate.
Thanks for this blindingly simple solution to the Out Of Memory Error when upgrading WordPress go to David Orlo at DavidOrlo.com.
Click here to see how he found the fix