How to Prevent Comment Spam On Your WordPress Blog

If you use WordPress, you would have no doubt experienced the frustration of comment spam.

As your website or blog continues to grow in size and popularity, you will also find that the volume of comment spam to your site will increase, which is a massive headache for bloggers and other website owners all over the world.

As well as the obvious interference, and additional work involved in manually removing these comments, if gone unnoticed they may cause offense to your visitors, and possibly damage your website rankings, as many of these comments include links to adult or gambling products, and almost certainly will not include any relevant content related to your webpage

Whats more, if you are displaying Google Adsense on your website, you may jeopardize you account, if the comments include content that is not permitted for use on the same page as Adsense ads.

In addition to the on site issues you will also start to experience back-end problems. With time, these spam comments will take up a lot of space in your database which in turn may end up slowing down the load speed of your site.

So what can we do to prevent comment spam on your WordPress blog or website?

Well here are some great tips and effective solutions to help you eliminate comment spam from your WordPress site. We will start off by investigating, and setting up our standard configuration from within the WordPress dashboard.

1. Login to your WordPress dashboard and navigate to ‘Settings’ and then ‘Discussions’

The following settings page will display, and you can make your chosen selections. You will the options self explanatory, and select the best options to suit.

Preventing WordPress Comment Spam

Sometimes the options can be difficult to decide, as you want to prevent unwanted comments, but you do not wish to prevent a comment that is going to provide value to your article.

Here are a couple of my preferred options which gives a happy medium.

1. Moderating the comments by using the “Before a comment appears” section. This is whereby you disable automatic publishing of comments and instead, queue them for review before publication.
Under this option, you have two choices to make.

First, “comment must be manually approved”, allows you to manually scan all the comments published on your blog. You have full control over the comments published. Although reviewing/moderating comments takes time, in the long run, it ensures that there are no spam comments on your main site.

Second, “comment author must have a previously approved comment”, This will reduce time for you, as you are only moderating the comments of new users while ones by old users get published automatically. The reasoning behind this is that, if a user leaves a relevant comment the first time, it’s very likely that they will do the same, if they post a comment again.

I usually find that it is the behavior of first time commentators that are mostly unpredictable, but one good comments have been approved, any future comments are acceptable in most cases – however there are always exceptions, and you will still need to keep a watchful eye over all of your comments while using this option.

2. Blacklisting Comments: Blacklisting is ideal for users who persistently post spam comments on your site. This feature enables the WordPress page author to blacklist in terms of content being posted, names being used, a user’s email address or, a user’s URL. The reason why this is highly effective is that, there are loads of people whose main intention is to manually post spam comments on different sites, and usually, the content being posted is the same, and of no relevance to the article posted.

You can enter email address, IP’s or URL that you would like to block in the large text box of the discussions page as shown in the image above.

3. Closing Comments on Older Pages and Posts: Usually, spammers tend to target posts that have already generated good SEO ranking and traffic. Fortunately, WordPress makes it possible for you to close comments on pages or posts that were published months or years before. Even though this option doesn’t prevent spam comments for good, it helps reduce their numbers quite significantly, since new posts are less likely to attract spammers.

The setting for closing comments after a desired amount of time, can be found under the ‘other settings’ section of the WordPress discussions page. Please note that once enabled this setting does not automatically close the comments section of posts that are already active. If you need to close comments on existing posts you will need to -:

> Go to the WordPress dashboard

> Select ‘Posts’

> Select ‘All Posts’

> Hover over the post you would like to edit

> Select ‘Quick Edit’

You can then un-check the ‘Allow Comments’ box.

Your post will no longer be able to accept comments of any type.


4. Using CAPTCHA Verification:

captcha image

CAPTCHA is designed to auto generate unique numbers and letters which are usually in form of an image that one has to enter correctly in a box before being allowed to submit a comment. Since most commentators perceive this as a tedious and annoying process, there will be some assurance that the people going through this whole process to submit a comment are legit. Activating this option is very fast and requires no special skill at all.

Since spam comments tend to increase as your WordPress site becomes popular, the way forward is to adopt a solution that best suits the current need. For instance, a new site may work well with comments moderation while an older and more popular one may require a specialized solution, such as the adoption of special anti-spam plugins, which I will cover later in this post. At the end of the day, it’s all about what works for the author.

Although many people find CAPTCHA annoying, they do serve a purpose, and one of the most reliable (and easy to read!) CAPTCHA plug ins I have found is SI CAPTCHA Anti-Spam. This is a free plug in, easy to set up and works straight out of the box

5. Installing an Anti-spam Plug In

If you have implemented the above options, or you are in need of a more automated route for preventing WordPress spam comments, you can install an AntiSpam plug in.

There few good plugins but to choose from but Aksimet is probably the most trusted and widely used option as it is developed by WordPress themselves.

askimet spam comments graph

Askimet is a great time saving plug in as it automatically detects and filters all comments that have come from a bot. Rather than deleting the comments that it has found, it stores them in a folder, so you are still able to check to make sure that it has not filtered any genuine comments. However you will find that Askimet manages to get it right more than 99.9% of the time.

This once free plug-in, Askimet is now chargeable at $5.00 per month – if you are running your website or blog to create an income, however it is still free if you are simply operating a personal blog without any monetization.

If you would like information on how to set up Askimet, and get your API key, please follow the video tutorial below.

If your not quite ready to commit to Askimet’s monthly charge, you should check out a totally free WordPress plug in from Anti-Spam Bee.


Anti-spam Bee is very simple to set up, and is getting a great reputation for its accuracy. You are able to prevent comments from certain countries or languages, and get all of the stats directly on your WordPress dashboard.

You will receive emails advising you when a spam comment has been detected so you are able to login to your dashboard and either mark it as spam or simply delete it.

In my opinion I think that as a free plug in, Anti-spam Bee is a great option for small to medium size websites, however I personally feel that for larger sites, a paid option offers more in the way of regular updates and support, which is an important factor as the spammers discover ways to beat the system.

wp comment cleaner


If you have found yourself in the unfortunate position of having 100’s or 1,000’s of comments left on your website or blog, I have found a great little plug called WP Comment Cleaner that will remove all of your WordPress spam comments in bulk. It is very easy to use, and can be downloaded directly from the WordPress repository.

Related Posts

Related Posts

Leave a Reply