So I noticed yesterday that a newer version of WordPress was available. I clicked on the upgrade link and proceeded as usual until I was presented with the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2515174 bytes) in /var/www/usr/htdocs/wordpress/wp-includes/http.php on line 1327
This appeared very odd to me at first… 33,554,432 bytes allowed, but when it attempted to allocate only 2,515,174 bytes it caused a fatal error? Well as strange as that looks, there’s an easy fix…
(note, I assume you already backed up your DB and existing wordpress installation — proceed at your own risk)
To Fix*: (assuming you want to use the auto-upgrade feature still and not a manual upgrade)
- Open your existing wp-config.php file in a text editor of your choice
(note: if your blog is hosted on your computer you can just open the file and save it when you’re done, if your blog is hosted on an external server like mine is, you’ll probably need to FTP or SSH in, retrieve a copy, edit, then upload the new version).
- Scroll down to almost the end of the file and you should see a comment that looks like this:
/* That's all, stop editing! Happy blogging. */
you want to put the code in step 3 just above this comment.
- Insert the following line of code on it’s own line (mine is on line 67):
- Save the file (and be sure to upload the new copy if you have an external host).
- Go back to your dashboard, click the upgrade link, and proceed as normal.
I hope this helps someone, I know it helped me…
*special thanks go to the kind folks found here: http://wordpress.org/support/topic/344567