diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php index d48846f739..a59c7c36ce 100644 --- a/src/wp-admin/includes/schema.php +++ b/src/wp-admin/includes/schema.php @@ -535,6 +535,13 @@ function populate_options( array $options = array() ) { 'disallowed_keys' => '', 'comment_previously_approved' => 1, 'auto_plugin_theme_update_emails' => array(), + + // 5.6.0 + 'auto_update_core_dev' => 'enabled', + 'auto_update_core_minor' => 'enabled', + // Default to enabled for new installs. + // See https://core.trac.wordpress.org/ticket/51742. + 'auto_update_core_major' => 'enabled', ); // 3.3.0 diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 3342c76b65..ca95940b49 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -2255,6 +2255,11 @@ function upgrade_560() { if ( ! is_null( $post_category_exists ) ) { $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" ); } + + // When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default. + // This overrides the same option from populate_options() that is intended for new installs. + // See https://core.trac.wordpress.org/ticket/51742. + update_option( 'auto_update_core_major', 'unset' ); } /**