Automatically Mark Comments as Spam in WordPress
The Comment Spam Problem
Comment spam is an often encountered problem for WordPress users. It is not uncommon to receive over a thousand spam comments every week, but this high level of spam can significantly damage your reputation if you do not tackle it. It is thus very important to stop spammers. WordPress has solid built-in tools to prevent comment spam, but spammers use various tactics, so unfortunately there exists no ‘one size fits all’ method to protect your comments from being spammed. In this tutorial we help you to automatically mark certain comments as spam.
If you want to know how to stop comments on a very specific page or post, click here. If you want to find out more generally how to approve comments before they appear on your WordPress site, click here. If you want to configure that only logged in and registered users can comment on your site, click here. If you want to receive or stop the reception of comment notification emails, click here.
Creating a Comment Blacklist
In this tutorial, we explain how you can try to tackle the problem by creating a “comment blacklist”. If a comment matches your blacklist, the comment will be nuked and it will not appear on your WordPress site or blog. The comment will instead be marked as spam. When you create a comment blacklist, it is very important to choose your blacklist words wisely. Be careful though, blacklisting a word like ‘ass’ will automatically delete all comments that contain ‘ass’, e.g. assistance, assumption, etc.