What are WordPress orphan comments meta and how to clean them?

The comment metadata is the information you provide to viewers about each comment. This information usually includes the author of the comment, when it was written (or posted), etc. In some cases, some comment metadata information becomes orphan and does not belong to any comment. They are then called “orphan comment meta” and should be cleaned since they are not useful.

To clean these orphan comment meta, you can either use our plugin Advanced Database Cleaner or execute the following SQL code (which is used by the plugin) directly via your phpMyAdmin:

DELETE FROM commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM comments)