Update WordPress Automatically Without FTP
I discovered something magical today, how to update WordPress from within the Admin if you don’t have FTP enabled.
This means you can 1-click and update without having FTP enabled! The same applies to the plugins too.
All you have to do are a few steps.
- Add this to your config.php file, save and upload:
define('FS_METHOD','direct');
- Change the ownership of the files for the site as they need to be owned by www-data with the following chown command:
chown www-data:www-data -R *
- Change the directory permissions to 755:
find . -type d -exec chmod 755 {} \;
- Change the file permissions to 644:
find . -type f -exec chmod 644 {} \;
This also applies to plugins, one click and you are done!