Leave a Comment | Jul 21, 2009
WordPress Automatic Upgrade
For a few versions now WordPress has let you automatically upgrade it and your plugins. Every time an update would come around I'd try figure out how to activate it and fail. As a last resort you can specify ftp/ftps details and have it upgrade that way, but who wants to setup an ftp server right?
Anyway, it turns out that aside from setting file permissions like everyone tells you to do to setup the automatic upgrade feature, the actual missing piece of the pie was to give ownership of the entire wordpress directory to the owner of the apache process.
So, step 1: open up terminal and ssh to your server(use your ip address instead of all those 9s)
# ssh root@99.99.999.999
# [password]
step 2: Now you're running a remote session to your server, open top
# top
step 3: Expand the window and look for processes name httpd or apache2, chances are they're owned by the user www-data. Say you have wordpress installed in /var/www/, enter in:
# chown -R www-data /var/www
The above command changes the ownership of /var/www, which is a folder, recursively so it goes through and changes ownership of all the files and folders below it, and it's changing ownership to the user www-data.
Now log into wordpress and try auto upgrade.