The wp_blogmeta table is not installed. Please run the network database upgrade

We’re using WP Engine for web hosting.

I originally manually turned on Multisite through wp-config.php Tools Network Setup.

Since then, I've learned we need to use their Enable Multisite function to enable subdirectory multisite.

When WP_DEBUG is on, we see a message:

Notice: wp_check_site_meta_support_prefilter was called incorrectly. The wp_blogmeta table is not installed. Please run the network database upgrade.

I then created wp_blogmeta manually using:

CREATE TABLE IF NOT EXISTS wp_blogmeta (
meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
blog_id bigint(20) NOT NULL DEFAULT ‘0’,
meta_key varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
meta_value longtext COLLATE utf8mb4_unicode_520_ci,
PRIMARY KEY (meta_id),
KEY meta_key (meta_key(191)),
KEY blog_id (blog_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci AUTO_INCREMENT=1;

If I run the network database upgrade, the error remains.

How do I populate/”install” this table?

EDIT: WP Engine say they do not support issues with Multisite, so they're unable to help me resolve this.

Our wp-config.php contains:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

define('ADMIN_COOKIE_PATH', '/'); 
define('COOKIE_DOMAIN', ''); 
define('COOKIEPATH', ''); 
define('SITECOOKIEPATH', '');

We're using WordPress 6.0.

Topic multisite Wordpress

Category Web


This was an error on an older version of WordPress, version 5.1 (Core Issue #46167). Do you use the last stable version of WordPress?

But try the following options to solve the problem.

Install again, Core or WP CLI

Copy all files from the core again in your installation, like via sFTP, especially all files in the directories wp-inlcudes and wp-admin. Run the installation again. Alternate if you have the possibility with the usage of WP CLI wp core update-db --network.

Upgrade again

Go in your installation to the URL wp-admin/network/upgrade.php and perform the upgrade again.

Manual

Create the table or check your manual steps for this creation

CREATE TABLE $wpdb->blogmeta (
    meta_id bigint(20) unsigned NOT NULL auto_increment,
    blog_id bigint(20) NOT NULL default '0',
    meta_key varchar(255) default NULL,
    meta_value longtext,
    PRIMARY KEY  (meta_id),
    KEY meta_key (meta_key($max_index_length)),
    KEY blog_id (blog_id)
) $charset_collate;

Now look at the table wp_sitemeta, field site_meta_supported and set the value to 1. Background is, WP looks via is_site_meta_supported() for this value to use the table.


The URL to access the network database update is

https://www.website.test/wp-admin/network/upgrade.php

Or the location to where /wp-admin/ is installed plus /network/upgrade.php- as commenters have mentioned - I would reach out to WP Engine though - as you may have done something unexpected by adding those tables yourself.

Now might be a good time to check your backup processes have been working correctly too :-)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.