How can I delete many WordPress comments or posts that spammers have added?

One of the features of WordPress is that other people can add comments or other content to your site (if you’ve set it up that way).

However, we occasionally hear from customers who tell us that they enabled comments (or even allowed people to register and contribute posts), then didn’t look at the site for a while — and now they have many spam comments or posts that they need to delete.

You can easily delete small numbers of comments or posts from the WordPress dashboard. (The “Comments” page shows only 20 comments by default, but you can increase that by clicking Screen Options in the top-right.)

If you have a large number, though, you may find these plugins useful to delete them:

Preventing future comment spam

WordPress has a number of features to prevent comment spam.

If you don’t want people posting any comments at all, you can disable the comment feature.

To do this for future posts or pages, click Settings > Discussion in the WordPress dashboard and uncheck the options that “Allow link notifications from other blogs (pingbacks and trackbacks)” and “Allow people to post comments on new articles”.

To stop new spam comments on existing posts, you can check the Automatically close comments on articles older than 14 days box. If you do this, and also block comments on all new posts as described above, spammers will soon not be able to post at all.

If you want more control over comments, many people find these WordPress plugins useful:

  • Disable Comments: Completely removes all comment features from WordPress, preventing anyone from adding any future comments anywhere in one step.
  • Akismet: Automatically flags many comments as “spam”.
  • WordPress ReCaptcha Integration: Makes visitors prove they’re human before allowing a comment.

The WordPress site has more tips to combat comment spam.

About the plugins

Just so it’s clear, we’re not the author of any of the plugins mentioned above. You should post on the WordPress forums if you have any questions.