How to Disable Comments in WordPress: Protect Your Blog from Spammers

disable comments in wordpress

Comments are a great way to get feedback from your readers, but they can also be a haven for spammers. If you’re looking for ways to disable comments in WordPress, you’ve come to the right place.

In this tutorial, we will show you how to turn off WordPress comments using three different methods: by editing the code, by using a plugin, or by using a setting in the Dashboard. Let’s get started!

Why do you need to Disable Comments in WordPress?

There are a few reasons why you might want to disable comments in WordPress. For one, comments can be a haven for spammers. They can also slow down your website, and they can be a security risk.

There are so many tools out there to automate tasks on commenting spammy links to generate backlinks to their website e.g. Scrapebox. Although WordPress Comment links do not add any value to their Search Engine Optimization Strategy as its no-follow link by default still SEO practitioners or spammers love this space.

Another reason is a security risk, Websites with a large database are exposed to more security risk than regular blog and ultimately they end up hiring a top third-party security service provider which eats their budget, Therefore, the Comment section exposes a bigger security threat to hackers.

How to Disable Comments in WordPress: Protect Your Blog from Spammers 22

Why do Spammers Love WordPress So Much?

One of the reasons spammers love WordPress so much is because it’s so easy to leave comments. All they need is a valid email address, and they can start spamming your blog posts with links to their websites.

Another reason spammers love WordPress is because of the number of websites that use it. According to BuiltWith, as of January 2017, WordPress is used by 28.0% of all websites on the internet. So, if a spammer can get their links posted on just a few WordPress blogs, they can reach a large audience.

There are some other reasons which are listed below;

– WordPress is now the most popular Content Management System in the world.

– In total, there are more than 30 million websites running WordPress as of January 2022.

– The top 5 most used languages for these WordPress sites are English (60.0%), Spanish (11.0%), French (08.0%), Portuguese (07.0%), and Italian (06.0%).

How Spammer Finds your WordPress Blog Or Website?

The process of finding a WordPress website or blog is quite easy for spammers. All they need to do is run a search engine query for the following terms:

– “leave a Reply”

– “Powered By WordPress”

– “Submit Comment”

– “Leave a Comment”

How to Disable Comments in WordPress: Protect Your Blog from Spammers 23

Once they find a WordPress website or blog, they will start leaving comments on the posts with links to their websites using automated backlink builders or tools like scrapebox.

Method 1: Disable Comments in WordPress Without Plugin

The first way to disable comments in WordPress is by using the Discussion Panel. This is the easiest way to disable comments, and it’s perfect for beginners.

Disable Comments On New Posts

To disable comments on new posts, follow these steps:

Step 01: Login to your WordPress Dashboard.

Step 02: Click on the Discussion tab.

How to Disable Comments in WordPress: Protect Your Blog from Spammers 24

Step 03: Under the Default article settings section, uncheck the Allow people to post comments on new articles box.

How to Disable Comments in WordPress: Protect Your Blog from Spammers 25

This will disable comments on your future or new posts on your website or a blog.

Disable Comments on All Posts

To disable comments on all posts, follow these steps:

Step 01: Login to your WordPress Dashboard.

Step 02: Click on Posts > All Posts.

Step 03: Select all posts from Select all button and Click on First Sorting Drop Down option and select “Edit” And click “Apply” button;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 26

Step 04: On right side of panel, Click on comments drop down option and select “Do Not Allow” to disallow all comments on selected posts;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 27

This way you can disallow or disable comments on all posts in your blog.

Therefore, by following this method disallow existing posts and in the first to disallow on new posts which will completely disable the comment section on your blog posts.

Disable Comments in WordPress on Specific Post or Pages

If you want to disable comments on a specific post or page, follow these steps:

Step 01: Login to your WordPress Dashboard.

Step 02: Click on Posts > Select and open your post;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 28

Step 03: On the right side of post’s settings panel, scroll down to “discussion” tab;

Step 04: Deselect “Allow Comments” as well as “Allow pingbacks and Trackbacks” to keep your spammers away from your website;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 29

In the same way you can do it using pages while going to pages > select your pages and the process is very straight-forward as above.

Method 2: Disable Comments in WordPress Using a Plugin

If you want an easier way to disable comments in WordPress, then you can use a plugin like Disable Comments.

Disable Comments is a very popular plugin with more than 100,000 active installs. It’s a lightweight and easy to use plugin that lets you disable comments on your posts, pages, and media files.

Disable Comments On Everywhere

Step 01: Download,Install and Activate Disable Comments Plugin;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 30

Step 02: After Activation, Go to Settings > Disable Comments option;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 31

Note: This plugin will disable wordpress’s discussion section, therefore, don’t get panic if you don’t see it in your settings section.

Step 03: Select “Everywhere” Option to disable comments on your entire website;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 32

Disable Comments on Specific Post Types

Step 01: Open Disable Comments Dashboard page.

Step 02: Check “On Specific Post Type” Option;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 33

Step 03: Select your post type where you want to disable comments;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 34

This will enable comments on unselected option and enable on selected option on your wordpress site.

Disable Comments With API

If your site uses Rest API or XML-RPC then this plugin offers you to disable comments on either of them using the steps below;

Step 01: Open Plugins Dashboard Page

Step 02: Scroll Down to the last option of “Disable Comments With API”;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 35

Step 03: Select Either of the option which is available for you to disable, if you use REST-API, then disable it using the toggle button.

Delete Comments in Bulk

Disable Comments not only disable comments on your website but also delete the existing comments on your website in few clicks.

Step 01: Go to your Disable Comments plugins Page on WordPress Settings.

Step 02: Select the “Delete Comments” Tab;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 36

Step 03: Now you can select and delete existing comments everywhere on your website at the click of your mouse;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 37

You can also delete with other options;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 38
  • On Certain post types i.e. Posts, Pages or Media
  • Delete Certain Comment Types
  • Delete Only Spam

Therefore, Disable Comments Plugin is the most convenient method to either disable or delete comments on your WordPress Project.

Method 3: Disable Comments in WordPress By Editing Code

If you are comfortable editing code, then you can disable comments in WordPress by following these simple steps:

Disable Comments On Functions PHP File

Step 01: Login to your WordPress Dashboard and open your functions.php file in a text editor;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 39

Step 02: Add the following code to disable comments in WordPress:

add_filter(‘allow_comments’, ‘__return_false’);

How to Disable Comments in WordPress: Protect Your Blog from Spammers 40

This code will disable comments on your website.

Step 03: Save and close the file.

Remove URL Field on Comment Section

There are many ways to lift those website fields in WordPress comment form. By Using Simple PHP code make it more reliable than adding plugins.

Step 01: Go To > Appearance > Editor

Step 02: Now on extreme right options, Select Functions.php and add following code after the last line;

add_filter(‘comment_form_default_fields’, ‘website_remove’);

function website_remove($fields)

{

if(isset($fields[‘url’]))

unset($fields[‘url’]);

return $fields; }

How to Disable Comments in WordPress: Protect Your Blog from Spammers 41

It will remove the website field in WordPress comment form.

Remove Comment Footprints in WordPress

As we discussed above spammers uses Scrapers to scrape your website on google using specific keywords which is called footprints. To eliminate all of these you need to delete it from language files or comments.php file.

Step 01: Go to Appearance > Theme File Editor

Step 02: Select your theme and open Comments.php file;

How to Disable Comments in WordPress: Protect Your Blog from Spammers 42

Note: Please Keep Backup before saving new code.

Now Press CTRL + F and search for the footprints we have listed above like “Leave a Comment” and edit it with your own custom title or remove it completely;

This way you can also edit and remove such footprints like “Powered by WordPress” from your footer.php file.

Conclusion

Therefore, by disabling comments in WordPress you can protect your blog from spam and keep it running smoothly. In this tutorial, we have discussed three different methods to disable comments in WordPress. You can choose the one that best suits your needs. Happy Blogging!

Frequently Asked Questions

We Hope we have answered your queries regarding disable comments in wordpress but still if you are looking for some questions then we have listed some FAQs below to answer it.

Can We Disable Comments Without Plugin?

Yes, we can disable comments without plugin but it requires some coding knowledge to disable comment in wordpress.

Is It Safe To Disable Comments?

Yes, disable comments is completely safe and will not harm your wordpress blog or website. In fact it will help you to keep your blog clean from spammy comments.

What if I don’t want to disable comments, Is There any Alternative Solution?

Yes, You can install third-party discussion plugins for wordpress like Disqus, Postmatic, wpDiscuz etc as it keeps spammers or scrapers away from getting your website.

Also, you can install Cloudflare also to let all proxy IPs have to pass through captcha to access the source page. It will act as a barrier for most of the scrapers.

I disable comments but still, I am getting spammy comments. How to get rid of it?

If you are using default wordpress comment system then there are high chances that you will get spammy comments because bots can easily bypass the captcha. In this case, you can install any third-party discussion plugin or Cloudflare to get rid of it.

We hope this article helped you disable comments in WordPress. If you have any questions, feel free to ask us in the comment section below. Also, don’t forget to share this post with your friends on social media! Thanks for reading! :)

WordPress Resources;

27 Must-Have WordPress Plugins (All are Free!)

How to backup WordPress site (5 Methods) – The Ultimate Guide

What is WordPress used for? Here are 8 Examples to get started

8 eCommerce Plugins for WordPress for Your Next Big Store

By Raman

Welcome to my SEO Community. My name is raman and i am co-owner of kwebby.com, Here you will find latest tricks and tips of SEO, Free tools etc. I love to share my knowledge as the internet is meant for sharing. Letme know if you have any queries i will love to resolve that.