On October 24, 2013, WordPress version 3.7 was released. The code name of this version is Basie. One of the new flagship feature in this version is automatic updates. This allows your WordPress installation to automatically apply major and minor updates without you having to do a thing.The automatic update feature uses a variety of checks and balances to make sure updates are reliable and safe, and a day after the release of Basie, over 100,000 updates were done with no critical issues reported.
Reasons to Disable Automatic Updates in WordPress
Allowing automatic updates in WordPress may not be the best for some installations. In particular, you may want to disable automatic updates in WordPress for the following reasons:
- You manage your site’s code through version control;
- Custom code that you added to WordPress or;
- You feel confident you can do updates yourself.
You may also want to disable automatic updates in WordPress because of the plugins that you have installed. You might want to wait to make sure the plugin is compatible with the new update, because its a core plugin or because the plugin is custom and may require adjustments.
Disable Automatic Updates in WordPress
There are several methods you can use to disallow automatic updates. Let’s take a look:
Disallow the Entire Automatic Updater
You can use the constant AUTOMATICUPDATERDISABLED to disallow the automatic updater entirely. The constant is similar to the constant of DISALLOWFILEMODS, which disallows all file changes, but is specific to the automatic updater.
Just add the following to your wp-config.php file:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
This applies to the entire automatic updater, which includes major and minor updates, but we can also just effect only core updates.
Disable Only Core Updates
For core updates, WordPress uses the WPAUTOUPDATE_CORE constant. There are two different ways we can manipulate the core updates.
1. Disable All Core Updates
# Disables all core updates define( 'WP_AUTO_UPDATE_CORE', false );
2. Enable Minor Updates Only
# Enable updates for minor releases define( 'WP_AUTO_UPDATE_CORE', 'minor' );
The WPAUTOUPDATE_CORE constant does have a third setting. Instead of false or ‘minor’ you can set it to true, but this enables all core updates, including minor and major.
Manipulate Notification Emails
Emails are sent after a update, when WordPress can’t update itself and a debugging email for development versions. These emails state one of three results: success, failure, and critical error.
If you are disabling automatic updates, you won’t need notification emails and if you manipulated core updates, you may not want notification emails. So, let’s disable notification emails.
add_filter( 'auto_core_update_send_email', '__return_false' );
Plugin and Theme Updates
Hey, don’t worry, plugins and themes automatic updates are disabled by default.
To disable automatic translation updates, which are enabled by default, you can use the following:
add_filter( 'auto_update_translation', '__return_false' );