WordPress Automatic Updates

If you want to get WordPress to accept automatic updates and are running your own server, you want the flexibility to not go through these steps every time an update arrives. You also want good security. I had to do this recently on several sites and thought I would share my notes.

First, I type in my wordpress root:

find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;
find /path/to/your/wordpress/install/ -type f -exec chmod 644 {} \;

Then I change all file ownership to match the wordpress user, which in my case is www-data.

chown -R www-data:www-data *

Finally, I have to update my my wp-config.ini to display the location of ftp data and forces the filesystem method to “direct”. This forces your wordpress install to use Direct File I/O requests from within PHP, so there are security implications and you want to make sure your server is otherwise locked down.

define('FS_METHOD', 'direct');
define('FTP_CONTENT_DIR', '/path/to/your/wordpress/install/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/your/wordpress/install/wp-content/plugins/');

One Reply to “WordPress Automatic Updates”

  1. bevislarsen says:

    Now I Know how I can update automatically in my personal server.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.