elias diab

all watched over by machines of loving grace

Auto Update Wordpress Without Ftp Connection

Moving my installation away from a hosting plan to a VPS was the reason to mess around with Wordpress’ files permissions. What really bugged me was the fact that the auto update was not working, it was asking for FTP connection details.

The problem was caused because the web server user has no permissions on your wordpress installation dir. First, find the web server user, assuming you use apache2:

1
root@yourdomain:~# ps aux | grep 'apache2'

in my case the web server’s username is www-data, but other usernames exist (e.g. nobody). 

Check the ownership of your wordpress dir directory:

1
root@yourdomain:~# ls -l wordpress_dir/

and add the web server user’s owneship to that directory:

1
root@yourdomain:~# chown -R www-data wordpress_dir/

Now, your auto update should be working.