Is the auto upgrade feature in your WordPress broken?

With the recent security vulnerability announcement about WordPress <= 2.8.3 and the subsequent availability of a WordPress upgrade, I’ve taken to upgrading all of my WordPress blogs. On a few of them, the auto upgrade feature didn’t work.

While researching a solution, I stumbled across a site that had some info on how to fix it. The solution presented on the site said to go into the wp-content directory and delete the directory named “upgrade”. I tried this and my auto upgrade still failed. As I continued looking for a fix, I found another site with a comment on the page that mentioned changing the memory settings for the running PHP process. I did that and my problem was solved.

You can change the memory settings using a few different methods. The easiest method is to edit the wp-config.php file in your DocumentRoot. Add the following the line to your wp-config.php before the line that reads “/* That’s all, stop editing! Happy blogging. */”. It should look like:

/** Define memory settings */
define('WP_MEMORY_LIMIT', '64M');

/* That's all, stop editing! Happy blogging. */

Change the “64” to something greater if it still doesn’t work. It could be that you have plugins that require lots of memory. Another way is to add the following line to the .htaccess file in your DocumentRoot:

php_value memory_limit 64M

Or you can also edit the php.ini file, finding the line that says “memory_limit” and changing it to read:

memory_limit = 64M