Not creating table wp-blogmeta
-
I’m getting this error with the upgrade
Notice: wp_check_site_meta_support_prefilter was called incorrectly. The wp_blogmeta table is not installed. Please run the network database upgrade. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.) in /home/…/wp-includes/functions.php on line 4667
. Seems like the table should have been created on the update, but none was created. How can I create the table, or how can this be fixed.
-
@jej12 You’re welcome! =D
Trying to directly access upgrade.php just told me “Your WordPress database is already up-to-date!” and didn’t fix the problem. Anyone find any other solutions?
@10v2 In my case, I had to clear the cache for the Query Monitor to update.
If it still does not work, undo the update, install Health Check & Troubleshooting (https://www.ads-software.com/plugins/health-check/) and diagnose the system.
After correcting everything the plugin shows you, redo the upgrade to 5.1, perform a new upgrade of the database again through upgrade.php and clear the cache.
If it still does not work, restart the server.
@fabinho7 Thanks – but did not work for my case so far, of course! That would be too easy. Working on requesting server power cycle. Very much appreciate your help tho; all those steps make sense.
define( 'WP_DEBUG_DISPLAY', false );
for me until next patch, looks like.- This reply was modified 5 years, 9 months ago by brettgoodrich.
@fabinho7 https://YOUR-SITE/wp-admin/upgrade.php worked for me, thank you!
@bogdanguenther You’re welcome! =D
Hi everyone, thanks for reporting this issue and providing any information that you can. I’m trying to find a good way to reproduce this and/or figure out why the database table may not be created for some installs as part of https://core.trac.www.ads-software.com/ticket/46167.
There seems to be 2 separate issues:
1. A PHP notice generated because WordPress tries to use the
wp_blogmeta
table even though it doesn’t yet exist.
2. Thewp_blogmeta
table is not created.We can fix the first issue pretty easily in WordPress by making sure we don’t try to use the table in this one case until the table is available.
Some correct ways to solve the second issue are:
1. Visit
wp-admin/network/upgrade.php
and click “Upgrade Network”. This triggers the global database upgrade.
2. Use WP-CLI to update the network DB:wp core update-db --network
Both of these should work as long as:
1. The site address is for the main site of the main network.
2. TheDO_NOT_UPGRADE_GLOBAL_TABLES
constant is not defined.
3. There is nothing filteringwp_should_upgrade_global_tables
tofalse
I’m interested in knowing more about your environment if you’ve tried either of these options specifically and the database table is still not created. Please give me a ping and we can look at it closer.
Thanks!
Hey @jeremyfelt, thanks for your time. https://www.horizonindy.org is my site.
I tried doing #1 several times, including after reinstalling 5.1. I’m unfamiliar wih WP-CLI. The error still pops up for me.
The only thing I can think of is on (1) site address; mine is still set to https:// when I actually have switched over to https:// a while ago. I ran Health Check a couple days ago and it told me there was a mismatch there – not sure if that’d be enough to do it. Changing the site address apparently requires a direct database edit, and I hadn’t gotten to understanding the necessity or doing the research on it yet.
Here is the MySQL command to create this table. I hope it can help.
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
),
KEYmeta_key
(meta_key
(191)),
KEYblog_id
(blog_id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci AUTO_INCREMENT=1 ;- This reply was modified 5 years, 9 months ago by Redpik.
@jeremyfelt to be clear, after the network DB upgrade, should the table exist, but be empty?
I haven’t found a reliable way to populate it, though it can be recreated using the cli steps you’ve provided.
I am having the same issue, running multisite, this error show in logs on every page load of every site. Did the Update network, but that does not fix the issue of php stating the db table wp_blogmeta does not exist…so…wordpress devs please test multisite having been upgraded at each upgrade since wordpress 4.9. At some point wordpress is expecting this table to be there and skipping its creation.
I see there is activity to address this issue here: https://core.trac.www.ads-software.com/ticket/46167
Its known by the core devs
Hey @jeremyfelt,
In my case, I have a new, empty WordPress 5.0.3 installation, no plugins, no nothing, just a Multisite with only the main site.
When trying to update the network after upgrading to 5.1, this is the message: “Warning! Problem updating https://www.ktc.com. Your server may not be able to connect to sites running on it. Error message: cURL error 7: Failed to connect to https://www.ktc.com port 443: Connection refused”.
Also, my Nginx error.log file says: “2019/03/11 16:10:10 [error] 10928#10928: *1936 FastCGI sent in stderr: “PHP message: WordPress database error Table ‘ktc_com.wp_blogmeta’ doesn’t exist for query SELECT blog_id, meta_key, meta_value FROM wp_blogmeta WHERE blog_id IN (1) ORDER BY meta_id ASC made by require_once(‘wp-admin/network/admin.php’), require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), require(‘wp-includes/ms-settings.php’), ms_load_current_site_and_network, get_site_by_path, get_sites, WP_Site_Query->query, WP_Site_Query->get_sites, _prime_site_caches, update_site_cache, update_sitemeta_cache, update_meta_cache” while reading response header from upstream, client: 192.168.1.1, server: https://www.ktc.com, request: “GET /wp-admin/network/about.php?updated HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.ktc.com.sock:”, host: “www.ktc.com”, referrer: “https://www.ktc.com/wp-admin/network/update-core.php?action=do-core-upgrade””.
There is no issue of any type with accessing port 443 or anything server-related. All works well.
I tried @fabinho7 solution (going to https://YOUR-SITE/wp-admin/upgrade.php) and it went well. The database table has been created. In fact, everything else works just fine. As it did before the update to WP 5.1. No port 443 related problems.
You may want to know that this is a Nginx install (last version, several state-of-the-art security measures taken from well-known reliable sources such as Delicious Brains, Linode, Bjorn Johansen, 10up, etc). Nothing fancy about it, just an updated Ubuntu 18.04.1 Server with MariaDB 4.8.4, PHP 7.2 + FPM.
Now, if I repeat the original “upgrade network”, the curl error 7 related to port 443 appears again. So there’s something wrong about this.
Thanks.
- This reply was modified 5 years, 8 months ago by Goodvalley.
@fabinho7 Accessing upgrade.php directly worked for me. Thank you for the suggestion… I really appreciate it!
@hambeny I’m glad to have helped =D
- The topic ‘Not creating table wp-blogmeta’ is closed to new replies.