Automatic updates are automatic.
The basic, default behavior in WordPress 3.7 is automatic update of core for minor versions (i.e. X.Y.Z
to X.Y.Z+1
.)
No configuration options are exposed in the UI. To change the behavior, you’ll need to modify your wp-config.php
file, or add some filters:
Easy Disabling
Add the following to wp_config.php
:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
Alternatively, add the following filter:
add_filter( 'automatic_updater_disabled', '__return_true' );
Core Update Control
Via wp-config.php
:
// Update core - development, major, and minor versions
define( 'WP_AUTO_UPDATE_CORE', true );
// Update core - minor versions
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
// Core update disabled
define( 'WP_AUTO_UPDATE_CORE', false );
Via filters:
// Enable nightlies (dev updates):
add_filter( 'allow_dev_auto_core_updates', '__return_true' );
// Enable major version updates:
add_filter( 'allow_major_auto_core_updates', '__return_true' );
// Disable minor updates
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
Themes and Plugins
All-or-Nothing Auto-Update Themes and Plugins:
Theme and Plugin updates are disabled by default. To enable via filter:
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
These filters are passed to the update object; so it is possible to manipulate that object to target specific Themes or Plugins to be updated, either to whitelist (include) or exclude from automatic updates.
Translation Files
Translation file updates are enabled by default. To disable via filter:
// Disable translation updates
add_filter( 'auto_update_translation', '__return_false' );
Update Result Emails
The updater sends a result email on success, failure, or critical error. To disable via filter:
// Disable update emails
add_filter( 'auto_core_update_send_email', '__return_false' );
This filter can also be used to manipulate update emails according to email $type
(success, fail, critical), update type object $core_update
, or $result
:
/* @param bool $send Whether to send the email. Default true.
* @param string $type The type of email to send.
* Can be one of 'success', 'fail', 'critical'.
* @param object $core_update The update offer that was attempted.
* @param mixed $result The result for the core update. Can be WP_Error.
*/
apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result );