WordPress Autoupdates Tutorial
Since version 3.7, WordPress has included a built-in automatic update system. This tutorial explains the way those autoupdates work, how to configure them and how to completely disable WordPress autoupdates in case you want to handle them manually.
Default autoupdate configuration
By default, your WordPress site will update itself when a new minor or security update is released. This means, that if you’re on WordPress 7.0.0 and version 7.0.1 is released, the application will autoupdate itself. Typically, these are tightly scoped bug fixes and security updates so they are designed to be safe to install without testing. On the other hand, if there is a major version, for example WordPress 8.0.0 by default you will have to update it manually.
How to enable major release updates?
If you want the WordPress autoupdates to handle major core updates, you will have to add a single configuration line.
To do this, open the wp-config.php file in the root folder of your WordPress installation and add this line to it:
define('WP_AUTO_UPDATE_CORE', true);
How to enable plugin updates
If you want your plugins to be automatically updated by WordPress when a new version is released, you need to add a line to the bottom of your wp-config.php file, similar to the one above. This time, however, a filter is used for enabling the plugin autoupdates:
add_filter( 'auto_update_plugin', '__return_true' );
How to enable theme updates?
If you want WordPress to handle theme updates you need another line added at the bottom of the wp-config.php file:
add_filter( 'auto_update_theme', '__return_true' );
How to disable core autoupdates but enable plugins and themes autoupdates?
If you want to stop the autoupdates of the WordPress core (the WordPress application itself) but enable them for your Plugins and/or Themes, you can add these lines at the bottom of the wp-config.php file:
define( 'WP_AUTO_UPDATE_CORE', false );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
How to completely disable the WordPress autoupdates?
If you want to disable the WordPress autoupdates completely, open the wp-config.php file and add this line to it:
define( 'AUTOMATIC_UPDATER_DISABLED', true );