WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've inherited a WordPress (3.3.2) site that has 13k pending comments, all of which are spam.

To delete all these comments is it sufficient and safe enough to do:

DELETE FROM wp_comments;  
DELETE FROM wp_commentmeta;

...or alternatively TRUNCATE both tables in the database?

share|improve this question
up vote 2 down vote accepted

Yes. That will be sufficient. And I highly recommend that you activate the Akismet plugin to block spam. Probably if you think there might be any genuine comments in the 13k pending ones, then install and activate Akismet first. Then go to Comments in the Wordpress Dashboard, and click on 'Check for Spam'. It should automatically move all spam to the Spam folder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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