How to make WordPress auto-update without ftp

201503161028.jpg

Once in a while I have to upgrade a WordPress installation. Running most of the servers on AWS I just enable ports 80 and 22 (http and ssh) in the firewall. As for now I thought, WordPress always needed a ftp connection to do the super-easy auto updates and plugin-updates – looks like, it doesn’t.

If you add the above ( define(‚FS_METHOD‘,’direct’); ) to your wp-config.pgp in the root directory of your wordpress installation, wordpress is able to access the filesystem itself.

You only have to check, that the wordpress directory belongs to the same USER and GROUP like your apache:

1. ps aux | grep apache) -> check for user (mine was www-data)

2. check which group www-data is in: groups www-data

3. chown -R www-data /path/to/your/wordpress

4. chgrp -R www-data /path/to/your/wordpress


And you’re done.