0

I have something like 10000 comments. They are probably all spam except for one or two.

And they are all waiting for me to approve them. Is there a free solution to this issue?

Thank you!

1

Delete them all. I don’t think a few comments are worth so much of your time.

To clean up the entire table, open a SQL console (the plugin Adminer has an UI for that) and type:

TRUNCATE table wp_comments

You might have to change the name if you are using an other prefix than wp_.

Or … you could use an existing anit-spam plugin with open source (Antispam Bee and/or T5 Spam Block for example) and run all your comments through their filters. In a secound round, find all IP addresses marked as spam already and delete all comments with matching IP addresses.

That should cover most of the spam.

  • thank you! Yes I am not concerned about the few good comments. But I didn't see a bulk delete in the Wordpress comments. Would you know how to do that? – Genadinik Dec 14 '13 at 16:11
  • I am installing AntispamBee now. Thanks for the suggestion. – Genadinik Dec 14 '13 at 16:15
  • @Genadinik See my update for cleaning the table. – fuxia Dec 14 '13 at 16:15
  • thank you. Is there any way to do that bulk delete from the wordpress admin console? – Genadinik Dec 14 '13 at 16:15
  • @Genadinik See my next update. Use Adminer (or phpMyAdmin if available). – fuxia Dec 14 '13 at 16:19
0

You can simply delete them all for the first time and make your WordPress spam prof by tweaking the basic settings. WordPress has an advanced configuration for handling comments. Alternatively, you can utilize some plugins like Akismet to automatically detect and destroy spam comments from your WordPress blog.

You can also copy and paste the code below to your .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} /wordpress/wp-comments-post.php
RewriteCond %{HTTP_REFERER} !.*mydomain.org.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]

This will cover most of the spam comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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