Back in 2013, the WordPress 3.7 introduces the automatic update feature. There are 4 types of updates and that includes, the WP core, plugins, themes and languages.
Although updates are a good thing to do, from a security point of view, there are some aspects that you will want to take into consideration when doing an update.
So you may want to choose the time of the update, you may want to choose what to update and most of all you would like to take a full backup, just in case things don’t go out well, specially when updating themes.
So if you want to have it all controlled and take decisions after you first test everything, you can completely disable all automatic updates by adding this line to your wp-config.php .
Disable WordPress Auto Updates:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
WordPress sees two types of updates: minor and major. Major updates add additional functionality to the WordPress platform. This can be easily identified as WordPress 3.9, 4.0, 4.1 etc.
Minor updates are the updates of a major version of WordPress that was released to correct security holes and correct bugs. Their version number increases by 0.01. For example 4.2.1, 4.2.2, 4.2.3 etc.
By default, WordPress is configured to apply all minor updates automatically as soon as they are released.
Enable Core Updates for Minor Releases (default):
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
If you want to disable core updates, you can do that by using the following line of code in your config file.
Disable All Core Updates
define( 'WP_AUTO_UPDATE_CORE', false );
YOu can also install automatically all minor and major updates of WordPress by adding the following code to wp-config.php.
Enable All Core Updates, Including Minor and Major:
define( 'WP_AUTO_UPDATE_CORE', true );
There are also other ways to achieves this. For example you can use filters in your themes function or in your plugin files.
Use filters to change updates status
Here is a simple way to control all WordPress core automatic update
// Disabling All Updates Via Filter add_filter( 'automatic_updater_disabled', '__return_true' ); // Core Updates via Filter add_filter( 'auto_update_core', '__return_false' ); //disable development updates add_filter( 'allow_dev_auto_core_updates', '__return_false' ); //disable minor updates add_filter( 'allow_minor_auto_core_updates', '__return_false' ); //disable major updates add_filter( 'allow_major_auto_core_updates', '__return_false' );
And you can also control automatic updates of themes and plugins by using this filters:
// Disable automatic updates for All plugins: add_filter( 'auto_update_plugin', '__return_false' ); // Disable automatic updates for All themes: add_filter( 'auto_update_theme', '__return_false' );
And finally here is how you can disable the automatic update of the translation files
// To disable translation file updates, use the following: add_filter( 'auto_update_translation', '__return_false' );
Hope this helps you in your projects, it certainly helped me