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/');

Posted

in

by

Tags:

Comments

One response to “WordPress Automatic Updates”

  1. bevislarsen Avatar
    bevislarsen

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

Leave a Reply

Your email address will not be published. Required fields are marked *