diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index 5586347d48..5d4d1a578f 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/wp-admin/includes/update-core.php @@ -892,6 +892,9 @@ function update_core($from, $to) { $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db'); wp_remote_post($db_upgrade_url, array('timeout' => 60)); + // Clear the cache to prevent an update_option() from saving a stale db_version to the cache + wp_cache_flush(); + // Remove working directory $wp_filesystem->delete($from, true);