Home / WordPress / Disable WordPress Automatic Updates

Disable WordPress Automatic Updates

Published On: May 26th, 2020|Categories: WordPress|Tags: , , |2 min read|

Automatic background system updates has been added in WordPress version 3.7.

In WordPress, there are four types of automatic background updates:

  1. Core updates
  2. Plugin updates
  3. Theme updates
  4. Translation file updates

WordPress has 3 types of core updates. These are:

  • Core development updates
  • Minor kernel enhancements, maintenance and security enhancements (Minor updates)
  • Major updates of the main code (Major updates)

By default, only minor kernel enhancements (Minor updates) will be applied automatically. It is possible to change this and apply other code updates automatically. These changes are made in the wp-config.php configuration file.

The following changes are possible:

Allow automatic update for all 3 types of new versions:

define ('WP_AUTO_UPDATE_CORE', true);

Stop automatic WordPress updates:

define ('WP_AUTO_UPDATE_CORE', false);

Automatic update only for minor kernel enhancements (Minor updates):

define ('WP_AUTO_UPDATE_CORE', 'minor');

Additional WordPress Updates filters

Additional filters are also available, which allow for additional settings. For example:

Enable automatic update of changes that are still in development:

add_filter ('allow_dev_auto_core_updates', '__return_true');


Automatic WordPress update of themes and add-ons

Automatic update of add-ons:

add_filter ('auto_update_plugin', '__return_true');

Automatic theme update:

add_filter ('auto_update_theme', '__return_true');

Disable WordPress automatic updates

It is possible to disable all automatic updates in WordPress (Not recommended). This can be done by:

add_filter ('auto_update_core', '__return_false');

or

define ('AUTOMATIC_UPDATER_DISABLED', true);

Plugin & Theme Updates via Filter

By default, automatic background updates only happen for plugins and themes in special cases, as determined by the WordPress.org API response, which is controlled by the WordPress security team for patching critical vulnerabilities. To enable or disable updates in all cases, you can leverage the auto_update_$type filter, where $type would be replaced with “plugin” or “theme”.

Automatic updates for All plugins

add_filter( 'auto_update_plugin', '__return_true' );

Automatic updates for All themes:

add_filter( 'auto_update_theme', '__return_true' );

You can use __return_false instead of __return_true to specifically disable all plugin & theme updates, even forced security pushes from the WordPress security team.

Disable Automatic WordPress update Emails

Everytime there’s been an automatic update, an email is sent to the administrator. To disable automatic WordPress update emails use the following code:

// Disable update emails
add_filter( 'auto_core_update_send_email', '__return_false' );

More about configuring automatic background WordPress updates can be found here.




Related Articles

If you enjoyed reading this, then please explore our other articles below:

More Articles

If you enjoyed reading this, then please explore our other articles below: