When attempting to upgrade WordPress, you might encounter a Fatal error like we did on one of our WordPress installs when upgrading to WordPress 2.8.5. The error is typically encountered when automatically upgrading (from the dashboard) WordPress installations containing a lot of posts and or using many plugins. The Fatal error might appear as follows:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2354671 bytes) in ../public_html/wordpress/wp-includes/http.php on line 1331
How to Fix the Fatal error during WordPress Upgrade
Here is how we fixed the Memory Limitation problem and got our WordPress upgraded or updated and working fine again.
Using your favorite FTP client, FTP to your WordPress installation.
Copy wp-config.php to your desktop.
Open wp-config.php using a text editor and add the following line under the rest of the define lines in the MySQL Settings section.
Save the file and upload it back to server overwriting the old file when prompted.
Now simply login to the troubled WordPress site and proceed to upgrade.
WordPress should proceed to upgrade without the Fatal error.