WordPress Fix For A Fatal Memory Error
Today while I was upgrading my WordPress installation to version 2.9.1, the upgrade script exited prematurely showing a fatal error as follows :
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516315 bytes) in wp-includes/http.php on line 1370
There is an easy fix for this fatal error. The WordPress fix is as follows :
WordPress Fix
The WordPress fix for this fatal memory error is simple. You just have to allocate more memory for wordpress. By default WordPress is configured to use at most 32 MB memory. Here is how you raise this memory limit.
- Log into your WordPress hosting directory via FTP. I use FileZilla FTP client for doing this.
- Open
wp-settings.phpin a text editor of your choice. The full path of this file ispublic_html/wp-settings.phpassuming you have installed wordpress in the root of your domain. - Find out the following line :
define('WP_MEMORY_LIMIT', '32M');
and change it to …
define('WP_MEMORY_LIMIT', '64M'); - Save the changes you made and upload the
wp-settings.phpfile back to its true location .
Now you can easily upgrade your WordPress software without getting any fatal memory errors.
Note: You can also get Fatal memory errors when you install certain themes that offer lots of features. The procedure is the same in this case as well.

