Cleaning up Old Comment Meta Data in WordPress Updated on October 17, 2022 by Jeff Matson 1 Minutes, 19 Seconds to Read After a while, old comment meta data can sometimes pile up in your database in which it can take up space as well as negatively impact your site performance. In this article, we will show you how to easily clean up the wp_commentmeta tables in your database to remove old comment meta data that no longer applies. Create a backup of your database in case anything goes wrong. This steps is critical as you are deleting content directly from your database in bulk.Log into cPanel.Within cPanel, click on the PHPMyAdmin icon within the Databases section to access the PHPMyAdmin tool.On the menu to the left, select your WordPress database. If you are unsure of what database your WordPress site uses, follow our article on identifying your WordPress database.Now that your WordPress database is selected, look to the top of the page and click on SQL.Inside the text entry field, enter the following: SELECT * FROM wp_commentmeta WHERE comment_id NOT IN ( SELECT comment_id FROM wp_comments );DELETE FROM wp_commentmeta WHERE comment_id NOT IN ( SELECT comment_id FROM wp_comments );Then, press the Go button at the bottom right.If any content was removed, PHPMyAdmin will let you know the number of rows affected. If there was not any content to remove, it would simply say that MySQL returned an empty result. You should now know how to quickly clean up the wp_commentmeta table in your database. Following these steps regularly will ensure that the table in your MySQL database is running in top shape. Share this Article Related Articles How to Create an Admin Account in WordPress via MySQL Create a Footer for WordPress How to Create a Gallery in WordPress without a Plugin How to Disable the WP-Cron (wp-cron.php) in WordPress How to Change Your Site URL in Your WordPress Admin Dashboard W3 Total Cache – Guide to WordPress Caching WordPress – Changing the Site URL and Home Settings How to Globally Change the Font in WordPress How to Install WordPress using Softaculous Cleaning Up Old Post Metadata in WordPress
You should always advise those with prefixes to make sure their prefixes are changed or nothing will work.
<iframe width=”42″ height=”31″ src=”//www.youtube.com/embed/YFTzKgyuk9I” frameborder=”0″ allowfullscreen></iframe>