Getting WordPress Autoupgrade to Work

Back when WordPress 2.7 was first released, I was excited about the new autoupgrade feature. Basically it upgrades your site with the click of a button to the latest version of wordpress. However, it always failed when I would try it out, so I’ve been doing it the old fashioned way of either sftp or through terminal. The closest I got was this fix that I found which at least made it so I could upgrade/install plugins with one click.

Today I decided to see if anyone documented how to get this nifty feature working and I finally found it! The fix is way too simple that I should have thought of it on my own. I thought it was most likely a permissions issue. Basically, the wordpress files have to be owned by the user that runs apache. In most cases I believe this would be www-data at least I know it is on Ubuntu. 😉 So all you need to do is change the owner of the files/directories of your wordpress install. This example would be if you had your wordpress install in the www root in ubuntu.

sudo chown -R www-data:www-data /var/www/

or if you had it in a sub directory called wordpress you would just do

sudo chown -R www-data:www-data /var/www/wordpress/

This changes the owner and group to www-data to all the files and sub folders in the specified directory. After making that change, the upgrade process now works and the plugins install/upgrade too.

WordPress 2.9.1 should be out in the next day or two and I’m looking forward to a one click upgrade.

Categorized as Server

Leave a comment