Some blogs receive more spam than others for whatever reason, and these can get into your “pending” queue. If you don’t clean them out regularly, they will quickly build up to thousands of comments cluttering up your database and your comments section.
Once you select the database relevant to your blog, click the “wp_comments” table on the left-hand side.
This will bring up all the records associated with your comments. As you can see, each has a number of fields attached to it. If you scroll over to the right, you’ll see a field called “comment_approved” with values of either 1 or 0.
You will see a text area where you can type in SQL commands. To remove all pending comments, use the following:
DELETE FROM wp_comments WHERE comment_approved = 0
You can extend this functionality to remove ALL WordPress comments entirely.
DELETE FROM wp_comments
Comments are closed.