How to Avoid Spam Comments in WordPress [And Why You Might Want To]

upqode | Dec 2nd, 2022

Do you know that even if your WordPress Website does not have Comments functionality fields visible on the pages, there is a chance your website may get spammed via comments?

 The WordPress comment system is a useful tool. Nevertheless, not every website will require or want this feature. So let’s take a look at two different cases: when we do have Blog Functionality and a Comment section and when we do not have a Comment section on our website.

Every website is unique, so you’ll need to consider the advantages and disadvantages of comments for your specific audience and niche. There are several simple ways to disable comments, either full or partial if you’d decide to.

1. Disable Comments Using WordPress’ Built-In Options when we do have Blog Functionality and a Comment section:

Using the platform’s default settings is the first and simplest way to disable WordPress comments.

 Option 1: Turn Off Comments on a Specific Post or Page

Let’s see how to disable comments on a specific post or page.

Open the relevant WordPress page or post to get started. Then, check out the right-hand sidebar. You should see a section labeled Discussion then go ahead and open it up:

Disabling comments on a WordPress post
Disabling comments on a WordPress post

Here, you’ll find two options. To disable comments, simply uncheck the Allow Comments box and Allow pingbacks & trackbacks. Then, make sure to save or update the page or article so that readers can no longer submit comments.

Remember that this won’t get rid of any previous comments on the page or article. You will need to manually remove them from your WordPress dashboard Comments area.

Option 2. Turn off Anonymous Comments

As well, you have the option to disable anonymous comments. By default, WordPress native comments ask the visitor for their name, email address, website, and comment.

It is not required if anonymous comments are enabled. This instantly attracts a large number of spam bots who regularly crawl through the comment boxes on websites.

To disable anonymous comments in WordPress simply check the Comment author must fill out the name and email option under Settings > Discussion.

Turn off anonymous comments
Turn off anonymous comments

 Option 3: Enable Comment Moderation

Your next option to stop spam comments in WordPress is to use built-in moderation features.

The first one is the ability to approve manually each comment. This won’t stop spam, but it can be a good approach to make sure that only the right, authorized comments are displayed to site visitors.

The second one is the comment moderation queue. For example, if a comment has a predetermined number of links or simply contains a link, you can automatically submit it for moderation. 

In addition, you can create a list of terms, names, URLs, IP addresses, etc. that are stored for moderation.

Go to the Email me whenever and the Before a comment appears sections and take the following steps:

  • to moderate all comments, check the Comments must be manually approved.
  • check the Send me an email whenever… checkboxes: A comment is held for the moderation option and Anyone posts a comment to receive email notifications any time a comment is being moderated (it’s important that you can approve or delete it immediately). Anyone can leave a comment, but it is moderated.
Enable Comment Moderation
Enable Comment Moderation

 Option 4: Only Allow Comments from Logged-In Users

You can think about allowing comments only for site visitors who are logged in if you want to further limit the audience that can leave their thoughts via comments. You can do this if your website has a community with a certain number of members and you want to encourage debate in that community, but not allow other commenters.

Important: this step we are using only if we do have a registration form on the website, if there is no such – we do not check it in.

To do this, go to the Other comment settings section. Check the Users must be registered and logged in to the comment option.

Allow comments from logged-in users
Allow comments from logged-in users

Option 5: Reduce or Ban Links in Comments

Links are what we often found in spam comments as they are often placed with the intent of driving traffic to the spammer’s website. You can ban comments with links entirely or reduce the number of links allowed in a comment.

In the Comment Moderation section, select the number of links a comment needs to have before it’s held for moderation in our case it is 0.

If you prefer not to accept comments containing more than one link, use a higher number.

Reduce comment links
Reduce comment links

 So if to sum up you will get these kinds of settings: 

Comments Configuration when we have Comments Section
Comments Configuration when we have Comments Section

2. Disable Comments Using WordPress’ Built-In Options When We Don’t Have a Comment Section:

Turn Off Comments Globally:

You can do this by navigating to Settings > Discussion:

WordPress’ Discussion settings
WordPress’ Discussion settings

Just uncheck the Allow people to submit on new posts.

This means that comments will no longer be available for any new posts posted on your website.

There are two drawbacks to this particular method. Firstly, it does not remove current comments from your website like the option above (you still need to remove them manually).

Secondly, only new comments will be affected; comments on your old posts will not be disabled. Luckily, you can also handle this one with a little technique.

On the same page, find the Automatically close comments on posts older than __ days option, check the box, and enter 0 in the field.

Automatically close comments
Automatically close comments

This will make it difficult, but not impossible, for bots to leave automated comments, which make up the majority of comment spam. Also, it can prevent users from trolling your site or posting nasty comments.

In general, if to sum up, you will get these kinds of settings:

Comments setups when we don’t have Comments sections
Comments setups when we don’t have Comments sections
Filed under: WordPress Development

Related posts


What They Say

This is a team that pays great attention to detail and does great work. I had a design done for my website by a separate designer, and Nick implemented the design perfectly for both mobile and desktop. His team uses project management software to track tasks and break up the work for his team into sprints. You aren’t just getting a developer when you hire Nick, you’re also getting great project management and organization. I 100% recommended it.

Erik DiMarco

Manager, NimbleDesk

UPQODE delivers high-quality web work quickly, thanks to their expertise in PHP and WordPress. Regular communication and reasonable prices further smooth the workflow. We've been very pleased with the results. UPQODE responds far more quickly to development changes than our core team would be able to. They are highly knowledgeable about best practices in WordPress, and their ability to rapidly scale up whenever we need a project completed makes them a valuable asset for us in our development needs.

Jim Kreyenhagen

VP Marketing and Consumer Services, doxo

The engagement resulted in an aesthetically pleasing website that satisfied internal stakeholders. They dedicated capable resources that ensured effective collaboration. UPQODE’s attentiveness and flexibility support a successful partnership. They created a beautiful website that we love. The site functions to advertise a certain medical procedure, so I can’t speak to any traffic metrics. UPQODE's responsiveness was their most impressive quality.

Jessica Echevarria

Administrator, University Division

UPQODE delivered a functioning and accessible website. Their adaptable approach to customer service allowed for a smooth development process and set the foundation for possible future collaborations. The delivered website met all of my requirements and explains everything I need it to. UPQODE was very understanding and accommodating of my changing needs throughout the project. The communication was excellent. I plan to work with them again for future needs.

Darren Devost

Owner, Devost's Dynamic Marketing

The vendor succeeded in creating innovative WordPress solutions. Their availability enabled the client to deliver products more quickly. UPQODE's project management was good—their staff met weekly with the client and was always very punctual. UPQODE brought troubleshooting, recommendations, and ideas that our previous partner was unable to provide. They deliver work on-time and within budget. The design they’ve inserted into the product has enabled us to deliver products more quickly. They have always been very helpful in recommending better solutions.

David Bill

President & Founder, Liquid Knowledge Group
Request a Design