How to Configure Automatic Updates in WordPress

WordPress 3.7 introduced automatic upgrades. Maintenance and security updates are applied in the background when a patch becomes available and someone visits your site. By default, the process only applies when updating minor versions — such as 3.7.0 to 3.7.1 — and takes no longer than 25 seconds. The development team tested more than 111 thousand sites without a failure. You shouldn’t experience any problems.

That said, we developers work in binary. Things either work or they don’t; we’ll translate the phrase “shouldn’t fail” to “will inevitably fail at some point”. Automated updates are especially risky if you:

  • use a large number of dubious plug-ins or complex third-party themes
  • want to control and manage updates yourself, or
  • have an especially nervous disposition!

Will Your Site Be Problematic?

File permissions, network connectivity and other issues can cause updates to fail. If you have concerns, install the Background Update Tester plug-in to help you spot the most obvious problems. After enabling, visit the Update Tester screen from the dashboard.

Disable Automatic Updates

The WordPress team discourages disabling updates but there are a couple of options should you wish to disobey:

  1. Use version control. If WordPress detects Subversion, Git, Mercurial or Bazaar files in the installation folder, plugins folder or any parent folder, it will disable automatic updates.
  2. Alternatively, add the following line to your wp-config.php file in the WordPress root folder:
    define( 'WP_AUTO_UPDATE_CORE', false );
    

Enable Automated Minor Updates Only

Automated minor update installation is the default option so you shouldn’t need to do anything. However, if you’ve implemented something clever or unusual, you can explicitly set WP_AUTO_UPDATE_CORE in your wp-config.php file:

define( 'WP_AUTO_UPDATE_CORE', 'minor' );

Enable All Updates

Do you laugh in the face of danger and tickle the feet of fear? You can enable major and minor automated updates with:

define( 'WP_AUTO_UPDATE_CORE', true );

You’ll never need to hit that ‘Upgrade Now’ button again. That’s assuming everything went well and you still have a working dashboard to log in to!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • ixley

    Thx

  • John Sawyer

    As should have been expected, there are already plugins to control the automatic updates. Update Control is the one I’m using. It puts some new settings into the Settings | General page that give the user control over what gets updated.

    Regarding the possibility of failure, it always exists with any update. Even some of the highest profile plugins weren’t ready for the WP 3.7 update and caused failures. It’s not just the fly-by-night plugin/theme authors we have to worry about.

    If I had only 2 or 3 sites to deal with, I’d probably leave the minor updates on just because the potential damage is limited. However, I maintain about 75 sites for myself and clients and there’s no way I’m leaving automatic updates on and risking the possibility of waking up one morning to 75 crashed sites.