How to Disable Comments in WordPress – A Complete Guide

How to Disable Comments in WordPress – A Complete Guide full-article

Reading Time: 3 min, 41 sec

Comments are an important part of many WordPress websites, but they are not always needed. For blogs, discussions can be helpful. But for business websites, portfolios, or landing pages, comments may look out of place. Sometimes, comments also attract spam, which makes things worse.

As a WordPress developer, I often get asked: “What’s the best way to disable comments on my site?” The answer is that WordPress gives you several options. You can turn off comments site-wide, for specific posts, or even remove the comment system completely. Let’s go through all the methods.

Best WordPress Hosting

Bluehost is one of the best and secure WordPress hosting provider

1. Disable Comments on Future Posts

If you are setting up a new site and don’t want comments at all, the first thing you should do is stop WordPress from allowing comments on future posts.

  • Go to your WordPress Dashboard → Settings → Discussion.
  • Uncheck the option “Allow people to submit comments on new posts.
Disable Comments on Future Posts WordPress

This will ensure that any new post you publish won’t have a comment box. However, it won’t affect old posts that already have comments enabled.

2. Disable Comments on Individual Posts or Pages

Sometimes, you may want to keep comments on your blog but disable them for specific posts or pages.

  • Open the post or page in the WordPress editor.
  • On the right-hand side, look for the Discussion option.
  • It should say Open. Click on that.
Disable Comments on Individual Posts or Pages

To disable comments on the specific post, select closed.

Disable Comments on Individual Posts or Pages

This is useful if you want comments only on selected content.

3. Bulk Disable Comments on Existing Posts

If you already have many posts with comments enabled, turning them off one by one would be time-consuming. WordPress allows bulk editing:

  • Go to Posts → All Posts.
  • Select the posts you want to edit.
  • In the Bulk Actions dropdown, select Edit and click Apply.
  • In the options that appear, set Comments → Do not allow.
Bulk Disable Comments on Existing Posts

This will disable comments on all selected posts at once.

4. Disable Comments on Media Attachments

Many WordPress themes automatically enable comments on media attachment pages. You probably don’t want people commenting on your image or PDF files.

To disable this:

  • Go to Media → Library.
  • Click on the file you want to edit.
  • On the right-hand side, uncheck the Allow comments option under Discussion.

If you have many media files, you can use a plugin like Disable Comments to turn them off globally.

5. Completely Disable Comments with a Plugin

If you want to remove comments everywhere and never worry about them again, the easiest way is to use a plugin.

The most popular option is the Disable Comments plugin by WPDeveloper.

  • Install and activate the plugin.
  • Go to Settings → Disable Comments.
  • Choose whether you want to disable comments everywhere or only on specific post types (posts, pages, media, etc.).

This plugin also removes the “Comments” menu from the dashboard and hides comment-related features from the admin bar.

6. Disable Comments in Your Theme (Advanced)

If you are comfortable editing theme files, you can remove the comment template from your theme.

In your theme folder, look for the file comments.php. You can either delete its contents or remove the code that displays the comment form.

For example, in single.php or page.php, you may see something like:

<?php comments_template(); ?>

Remove or comment out this line to stop loading the comments section.

Important: Always use a child theme for making any changes to theme, otherwise your changes will be lost when the theme updates.

7. Disable Comments Using Code in Functions.php

Another developer-friendly method is to add code to your functions.php file. This way, you can disable comments across the site without a plugin.

Here’s an example:

// Disable support for comments and trackbacks
function disable_comments_support() {
remove_post_type_support('post', 'comments');
remove_post_type_support('page', 'comments');
}
add_action('admin_init', 'disable_comments_support');

// Close comments on the front-end
function disable_comments_status() {
return false;
}
add_filter('comments_open', 'disable_comments_status', 20, 2);
add_filter('pings_open', 'disable_comments_status', 20, 2);

// Hide existing comments
function disable_comments_hide_existing($comments) {
return array();
}
add_filter('comments_array', 'disable_comments_hide_existing', 10, 2);

This code removes comment functionality from posts and pages, ensures comments are always closed, and hides existing comments.

Final Thoughts

WordPress gives you complete control over comments. If you run a blog, comments can be valuable. But for business sites, portfolios, or eCommerce stores, they often don’t make sense. I have added all the ways you can use to disable comments. You can select any method that works best for you.

Deepanker profile image

Written by Deepanker

Deepanker Verma is an experienced WordPress developer who has been working on WordPress for more than 12 years. On TheWPGuides, he writes about WordPress, WordPress development, and WordPress plugins.

Leave a Reply

Your email address will not be published. Required fields are marked *

Need a Hand with Your WordPress Site?

Don't let technical issues slow you down. Our professional WordPress maintenance service handles updates, security, and performance optimization so you can focus on what you do best: creating content.

Learn More About Our Services