Using the autoupdate for WordPress when you have SFTP

The WordPress autoupdate feature allows WordPress to automatically download and install updates on your WordPress. It’s one of the best features in WordPress and usually performs a clean update in a matter of seconds without you having to mess around with your files. One of the downsides of autoupdate is that it does not support SFTP out of the box. There are several tutorials explaining how to recompile PHP to enable SFTP in WordPress, but the best way to get around this is to bypass using SFTP, FTPS and FTP altogether and assigning the correct permissions to your files so the web server can have write permissions. Log into your account using SSH and type:

chown apache /var/www/blog -R

Note: Some Linux distros use other users for Apache, like httpd, wwwuser, or wwwdata. Check the User directive in your Apache configuration to make sure you assign the right user to your files.

Be sure to replace the /var/www/blog with the path to your WordPress installation. And that’s it. WordPress should take care of the rest.