LIMITED TIME OFFER - Save 35% OFF on Password Policy Manager. Code: 35PPMWP

Configuring WordPress Automatic Updates

Last updated on August 07th, 2014 by Robert Abela. Filed under WordPress Security Tutorials & Tips

WordPress Automatic updates have been introduced in WordPress 3.7 and they are enabled by default for minor WordPress versions. WordPress Automatic Updates can be configured manually by adding lines of code to your wp-config.php WordPress file, or your theme’s functions.php file.

This WordPress tutorial explains how you can configure WordPress, WordPress plugins and theme automatic updates. The sections in this tutorial are:

Default Configuration of WordPress Automatic Updates

If you upgraded to WordPress 3.7, by default your WordPress will automatically update itself when a minor version of WordPress is available, for example from 3.7 to 3.7.1, and to 3.7.2 etc. Therefore there is no need to configure anything from your end.

Even though automatic updates are only available for minor releases, these are the most important releases because security fixes are typically released with minor releases of WordPress, hence should be installed as soon as possible. Other WordPress automatic updates can be configured as explained in the below examples.

Disable WordPress Automatic Updates for Minor Versions

If for some reason you are not comfortable with WordPress automatically updating itself when minor releases are available, you can turn off the WordPress automatic updates by adding the following line to the WordPress wp-config.php file:

define( 'WP_AUTO_UPDATE_CORE', false );

Disable ALL WordPress Automatic Updates

To switch of the WordPress automatic updates “module” and disable all types of WordPress automatic updates you can add the below line to the wp-config.php file:

define( 'AUTOMATIC_UPDATER_DISABLED', true );

Alternatively you can disable all types of WordPress automatic updates by adding the following filter to your theme’s function.php file:

add_filter( 'automatic_updater_disabled', '__return_true' );

Note: Although it is not recommended to disable automatic updates, there might be some specific scenarios where you would need to, such as:

  • You manage your WordPress using a version control system
  • You have your own WordPress deployment procedures (typically used when running WordPress on multiple servers)
  • You are confident you can push WordPress update in a timely fashion

Enable WordPress Automatic Updates for Major Versions

If you would like that WordPress automatically updates itself when there are development builds, minor releases and major releases (for example from version 3.7 to 3.8) add the below line to the WordPress wp-config.php file:

define( 'WP_AUTO_UPDATE_CORE', true );

Note: When major WordPress releases are available for download, they typically contain new features and functionality. Therefore it is not recommended to turn on WordPress automatic updates for major versions unless you know what you are doing.

Filter WordPress Automatic Updates

When you enable all WordPress automatic updates as explained in the above section, WordPress will automatically update itself when development (nightly builds), minor and major versions are available. You can use filters to selectively enable or disable any of them, as shown in the below examples.

Filter to Disable or Enable Automatic Development Updates (Nightly Builds)

Add the below filter to your theme’s functions.php to disable auto updating of WordPress when development updates (nightly builds) are available:

add_filter( 'allow_dev_auto_core_updates', '__return_false' );

To re-enable WordPress automatic updates of development updates (nightly builds) you can remove the above line from functions.php file or change ‘__return_false’ to ‘__return_true’.

Filter to Disable or Enable automatic Minor Updates

Add the below filter to your theme’s functions.php to disable auto updating of WordPress when minor version updates are available:

add_filter('allow_minor_auto_core_updates', '__return_false' );

To re-enable WordPress automatic updates of minor version you can remove the above line from functions.php file or change ‘__return_false’ to ‘__return_true’.

Filter to Disable or Enable automatic Major Updates

Add the below filter to your theme’s functions.php to disable auto updating of WordPress when major version updates are available:

add_filter('allow_major_auto_core_updates', '__return_false' );

To re-enable WordPress automatic updates of major version you can remove the above line from functions.php file or change ‘__return_false’ to ‘__return_true’.

Configure WordPress Plugins and Theme Automatic Updates

Automatic updates of WordPress plugins and themes are disabled by default. To enable them you have to add filters to your theme’s functions.php file as explained in the below section.

Enable WordPress Plugins Automatic Updates

To have your WordPress plugins automatically updated when a new version is available, add the following filter to your WordPress theme’s functions.php file:

add_filter( 'auto_update_plugin', '__return_true' );

Change the ‘__return_true’ to ‘__return_false’ to specifically disable automatic updates of WordPress plugins.

Enable WordPress Theme Automatic Updates

To have your WordPress theme automatically updated when a new version is available, add the following filter to your WordPress theme’s functions.php file:

add_filter( 'auto_update_theme', '__return_true' );

Change the ‘__return_true’ to ‘__return_false’ to specifically disable automatic updates of the WordPress theme you are using.

WordPress Automatic Updates

As explained in this tutorial WordPress will automatically update itself when minor versions are available for download. From the security point of view we do recommend you to keep the default WordPress automatic updates enabled to ensure your blogs and websites always runs the latest, most stable and most secure version of WordPress.

WordPress Hosting, Firewall and Backup

This Website is:

5 comments

Adam 13/11/2013

Thanks for the solid reference! It was nice to find all of these rules together.

santosh kumar 06/01/2015

there is a plugin update in my blog the below are my configuration but the plugin is not automatically updating
in wp-config.php
define( ‘WP_AUTO_UPDATE_CORE’, false );
adding filters in site specific plugin
add_filter( ‘auto_update_plugin’, ‘__return_true’ );
add_filter( ‘auto_update_theme’, ‘__return_true’ );
add_filter(‘allow_minor_auto_core_updates’, ‘__return_true’ );
add_filter( ‘allow_dev_auto_core_updates’, ‘__return_false’ );
add_filter( ‘allow_major_auto_core_updates’, ‘__return_true’ );
But the plugin isn’t updating why ?

Robert Abela 07/01/2015

Hi Santosh,

The directives look good. Just important to note that these directives only work for plugins and themes downloaded from the WordPress repository. If the plugin is not downloaded from the WordPress repository the automatic updates will not work.

Can you please specify which is the plugin?

santosh kumar 23/01/2015

The plugin to be updated is Jetpack and of course it is from wordpress repository but why it is not updated.Is there any other reason?

Robert Abela 25/01/2015

Hi Santosh,

I am not so familiar with Jetpack. Do any other plugins auto update? If they do, and the problem is only specific to Jetpack I would recommend you to post a support ticket on their plugin page.

Leave a Reply

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