WordPress Spam comments is big issue. I am getting daily 5k spam comments daily. we automated task of deleting spam comments automatically. Daily going to comments dashboard and deleting spam comments is really boring task. WordPress Akismat wordpress plugin does good job of finding spam comments.
automatically delete spam comments in wordpress
How to automatically delete spam comments in wordpress?
I am using Akismat wordpress plugin for my all wordpress blogs. It does good job of finding spam comments. Due to spam comments. comment-meta table becoming big and causing mysql resource issues. So cleaning comments table became necessary. so we used following hook in wordpress theme code.
Notes:
The number of blogs is hardcoded (3000)
Add above code in functions.php file.
If you want WordPress to automatically empty my spam comments after 1 day. Just add this to wp-config.php. Following code will automatically Empty Your WordPress Trash
Some wordpress developer asked me, how do i find my akismet api key for wordpress, For protect your site from spam comments you need the askimet api key. which is common for jetpack and akismet plugin. WordPress api key is very important for using the wordpress jetpack plugin. For hosted wordpress sites wordpress api key is very important.
how do i find my akismet api key for wordpress
Here I will show you how to get the new wordpress api key.
sign in with your WordPress.com credentials (if you not have wordpress.org account yet then sign up to worpdpress.org
Then go to your wordpress site and allow Akismet to connect to your WordPress account
click “sign up for a subscription”
choose your price plan. Get free plan.
be greeted by an “All Done” page and your big API key at the top of the page
Copy your api key and put in your wordpress site for jetpack plugin.
WordPress tutorial, how to stop wordpress spam comments and increase SEO. Spam comments is really major issue. Spam comments will affect your site SEO.
You should delete the spam word comments from wordpress site.
how to stop wordpress spam comments and increase SEO
If you want to prevent spam comments wordpress. You can check more points and wordpress plugins which will be helpful for wordpress websites.
If you have approved spam comments already than you can use following SQL query to change some spam comments status.
Using following sql query you can unapprove spam comments which are already approved.
Update wp_comments set comment_approved=0 WHERE CHAR_LENGTH(comment_author_url)>35;
2
Update wp_comments set comment_approved=0 WHERE CHAR_LENGTH(comment_author)>30;
After this, you can again recheck the comments which might be spam.
For SEO of your site deleting spam word comments is good.
Here are some steps for protecting your wordpress site.
You may copy and paste the following list to the Comment Moderation box in your wp-admin/options-discussions.php page:
-online
4u
adipex
advicer
baccarrat
blackjack
bllogspot
booker
byob
car-rental-e-site
car-rentals-e-site
carisoprodol
casino
casinos
chatroom
cialis
coolcoolhu
coolhu
credit-card-debt
credit-report-4u
cwas
cyclen
cyclobenzaprine
dating-e-site
day-trading
debt-consolidation
debt-consolidation-consultant
discreetordering
duty-free
dutyfree
equityloans
fioricet
flowers-leading-site
freenet-shopping
freenet
gambling-
hair-loss
health-insurancedeals-4u
homeequityloans
homefinance
holdem
holdempoker
holdemsoftware
holdemtexasturbowilson
hotel-dealse-site
hotele-site
hotelse-site
incest
insurance-quotesdeals-4u
insurancedeals-4u
jrcreations
levitra
macinstruct
mortgage-4-u
mortgagequotes
online-gambling
onlinegambling-4u
ottawavalleyag
ownsthis
palm-texas-holdem-game
paxil
penis
pharmacy
phentermine
poker-chip
poze
pussy
rental-car-e-site
ringtones
roulette
shemale
shoes
slot-machine
texas-holdem
thorcarlson
top-site
top-e-site
tramadol
trim-spa
ultram
valeofglamorganconservatives
viagra
vioxx
xanax
zolus
There are some nice plugins also which is helpful for protecting your site from spam comments.
You should activate the Akismet wordpress plugin.
Akismet is quite possibly the best way in the world to protect your blog from comment and trackback spam. It keeps your site protected from spam even while you sleep.
You should check the following option from wordpress:
Before a comment appears: (Options)
Before a comment appears An administrator must always approve the comment
Comment author must have a previously approved comment
If you have many spam word comments in your site then you should use sql query for delete the spam comments.
In Article, we tell you about how to change the filename of wp-comments-post.php file another name. and kill spam wordpress comments by changing filename.
kill spam wordpress comments by changing filename wp-comments-post.php
With WordPress blogs and sites spam comments is very big issue. That waste our lot of time. There is very nice plugin called Akismet by wordpress. Which is helpful for catching the spam comments but that is not smart enough. Some spambots simply hit the wp-comments-post.php and wp-trackback.php files directly, without scanning your site to find the real names of these scripts. You can foil such bots by renaming these files. My site is also faced the spam comments and hack issues by spmmers. So following trick is very useful.
This files will not track which comment is spam. In this tutorial I will tell you about how to change the filename of wp-comments-post.php file another name. This way you can easily protect your blog against spammer comments.
You need to just follow the steps:
Back up all your files.
Replace all instances of wp-comments-post.php in your theme template files with wp-comments-kill-spam.php. In most themes, this will mean editing comments.php and comments-popup.php; it’s a good idea to double-check by searching through all files in your theme directory with the “find and replace” feature of your favorite editor.
Upload your edited template files.
Rename your wp-comments-post.php file to wp-comments-die-spam-die.php. Be sure that wp-comments-post.php is gone when you’re done, or spammers will still be able to use it!
(Optional) Create a blank file and name it wp-comments-post.php. This will prevent spambots from getting a 404 error. If your 404 page is large, this will save you some bandwidth; it might also keep the spammers from catching on to your trick.
Check that everything works by posting a test comment to your blog.
You will find following code in comments.php file.