Sync the database schema

In rare situations, the WordPress database schema might not match the schema expected by the applications or plugin. For example switching to multisite, and the wp_users table is missing the spam and deleted colums

To fix this issue locally, create a file in the mu-plugins folder such as mu-plugins/db-upgrade.php with the following contents, and load the site:

require_once ABSPATH . 'wp-admin/includes/schema.php';
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
dbDelta( wp_get_db_schema( 'global' ) );

After the page is loaded the file can be deleted.

Revision #1
Created Thu, Apr 16, 2020 1:02 PM by Sander
Updated Thu, Apr 16, 2020 1:06 PM by Sander