I've just upgraded to 4.7.2, and now I see this message:

WordPress database error: [Table 'myusername.wp_termmeta' doesn't exist]
SELECT term_id, meta_key, meta_value FROM wp_termmeta WHERE term_id IN    
(2,3,4,5,6,7,8,9,10,11,12,13,1,14,15) ORDER BY meta_id ASC

What's the correct solution to this issue? I upgraded the database while upgrading. Lots of googling suggests strange things like upgrading to some beta releases, which I cannot do in production -- that might be worse.

Welcome any pointers!

1 Answer 1


You are missing a table. You can add it using this sql

CREATE TABLE `wp_termmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `term_id` (`term_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB AUTO_INCREMENT=3255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  • Thank you. I wish I had this before. Just ended up reinstalling my whole blog :)
    – PKHunter
    Commented Feb 11, 2017 at 10:52
  • 1
    Solid answer you've wrought there.
    – wogsland
    Commented Feb 27, 2017 at 15:17
  • Thanks, this snuffed-out my error messages. Wouldn't just running the WP Updater's reinstall function have the same effect? Commented Dec 21, 2017 at 19:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.