How to Disable Comments on WordPress: 6 Easy Methods

1. Disable Comments on All Posts and Pages

If you want to disable comments on all posts and pages, you can do so by going to Settings > Discussion in your WordPress dashboard. Uncheck the box next to “Allow people to post comments on new articles” and click “Save Changes”.

2. Disable Comments on Specific Posts and Pages

If you want to disable comments on specific posts and pages, you can do so by editing the post or page. Scroll down to the “Discussion” section and uncheck the box next to “Allow comments”.

3. Disable Comments on Older Posts

If you want to disable comments on older posts, you can do so by going to Posts > All Posts in your WordPress dashboard. Select the posts you want to disable comments on and select “Edit” from the Bulk Actions dropdown menu. Uncheck the box next to “Allow comments” and click “Update”.

4. Disable Comments on Media Files

If you want to disable comments on media files, you can do so by going to Media > Library in your WordPress dashboard. Select the media files you want to disable comments on and select “Edit” from the Bulk Actions dropdown menu. Uncheck the box next to “Allow comments” and click “Update”.

5. Disable Comments on Pages

If you want to disable comments on pages, you can do so by going to Pages > All Pages in your WordPress dashboard. Select the pages you want to disable comments on and select “Edit” from the Bulk Actions dropdown menu. Uncheck the box next to “Allow comments” and click “Update”.

6. Disable Comments on Custom Post Types

If you want to disable comments on custom post types, you can do so by going to Settings > Discussion in your WordPress dashboard. Scroll down to the “Other Comment Settings” section and uncheck the box next to the custom post type you want to disable comments on. Click “Save Changes”.

Enabling comments can be a great way to engage with your audience, but many users want to disable comments in WordPress for valid reasons. Having a comment section can pose security risks, and some sites simply don’t need one at all.

If you’re looking to disable comments on your WordPress site, you have come to the right place. In this article, we will explain multiple step-by-step methods on how to disable comments on WordPress.

Before we explain how to disable comments on WordPress, let’s see the reasons why you would want to do that in the first place.

Here are some reasons why you might want to disable comments in WordPress:

1. Spam

In general, spam refers to any unwanted user-generated content. People often spam with malicious intent, which makes it potentially harmful to people on the receiving end. Spam can also negatively impact a site’s reputation on search engines.

In the context of WordPress, spam comments are something that most site owners have to deal with. Personal blogs, large eCommerce websites, and everything in between can be affected by spam. To combat it, most website owners have various strategies in place, which include disabling comments.

Spam comments are notorious for their security risks. Many include dangerous links that can install viruses, collect personal information, and steal money from whoever clicks them.

Even if your site visitors know well enough not to engage with spam links, their presence on your site can negatively impact your trustworthiness.

Put it this way – if you don’t do enough to protect your website from security risks in your comment box, how are your visitors going to trust your brand as a whole? Putting in the effort to deplatform potential attackers by disabling comments is a step in the right direction.

3. You Are Running a Shop and Don’t Need Comments

When it comes to running an online store, having comment sections distributed throughout the website is unnecessary. Some shops prefer to disable all comments altogether, especially if the site’s primary purpose is to list the items they sell.

Having a comment section on your product pages can distract visitors that are otherwise interested in a purchase. It can also make your business appear unprofessional because unmonitored comment sections tend to attract spam links.

4. You Have a Dedicated Forum Where Your Viewers Can Have Discussions

Disabling comments on WordPress doesn’t mean you’ll cut off all engagement between you and your visitors.

You might’ve already created a separate space for your visitors to communicate with you and each other. Maybe you prefer to use a membership site or your social media channels for this activity.

In this case, you don’t need comments on your WordPress site. By disabling them, your site can focus on other purposes, such as providing information and making sales.

There are various methods to turn off WordPress comments. In this article, we will cover seven different options.

Method 1: Disable Comments in WordPress on All Published Posts and Pages

If you want to disable all comments on a website, this method is for you.

Once you apply the following changes, you’ll remove comments on all existing pages and blog posts.

First, you’ll want to delete all of the existing comments under every post and page.

  1. Navigate to the WordPress admin area.
  2. Go to Comments. You’ll see a table detailing every comment you’ve received on your site.
  3. Select all the comments by checking the box located on the top left corner of the table.
  4. Select Move to Trash from the Bulk Actions drop-down box.
  5. Click Apply.
The Comments page on the WordPress admin panel, showing how delete all of the existing comments under every post or page

At this point, you will delete all existing comments on your website. But the comment form will still be present. It will allow people to post comments underneath your posts and pages.

To fix this for future posts, let’s disable the comment form under every post and page. There are two ways to go about this.

The first option is to use Bulk Actions.

1. Navigate to Posts > All Posts. You’ll see a table containing all the posts you have published.

The Posts menu on the WordPress admin panel, showing where to click All Posts

2. Select all the posts by checking the box located on the top left corner of the table. Choose Edit from the Bulk Actions drop-down box.

The Posts page on the WordPress admin panel, showing how to click Edit in bulk

3. Find the Comments sections and click Do not allow from the drop-down box.

The Posts page on the WordPress admin panel, showing how to disable the comments

4. Finally, select Update to apply the changes to the article settings.

To remove comment forms on every page, navigate to Pages > All Pages and follow the same steps.

The Pages menu on the WordPress admin panel, showing where to click All Pages

Note that every page created on WordPress has the comments section turned off by default. If there are comments present on your pages, you probably changed the settings at some point. To fix this, follow the same steps for your pages as well.

The second option is to use the Automatically close comments on posts older than … days setting.

1. Go to Settings > Discussion.

The Settings menu on the WordPress admin panel, showing where to click Discussion

2. Under Discussion Settings > Other comment settings, find the Automatically close comments on posts older than … days setting. Fill the field with 0 to turn off comments for all posts.

The Discussion Settings section on the WordPress admin panel, showing how to enable Automatically close comments

This setting is a bit quicker than the first option (bulk edit). Unfortunately, you can’t apply this technique to pages. If you have comments on your pages and want to disable them in bulk, follow the first option.

While the first method can disable comments under your past posts and pages, it won’t prevent people who want to post comments on new articles. Thankfully, you can resolve this issue by applying a specific setting.

1. From your WordPress admin area, go to Settings > Discussion.

The Settings menu on the WordPress admin panel, showing where to click Discussion

2. Under Default post settings, uncheck the Allow people to submit comments on new posts box.

The Discussion Settings page on the WordPress admin panel, showing how to disable Allow people to submit comments on new posts

Upon applying this setting, your WordPress site won’t allow people to post comments under future posts.

Method 3: Disable WordPress Comments on Specific Posts and Pages

If you still value having some active comment sections, you might want to disable comments on specific posts or pages only.

The steps are very similar to the bulk edit section of Method 1. The difference is that you only need to select several posts and pages instead of all of them.

  1. Go to your WordPress admin area and navigate to Posts > All Posts.
  2. Identify the posts that you want the comments disabled and check their respective boxes.
  3. Select Edit from the drop-down box and click Apply.
  4. Make sure that you’ve selected the correct posts under Bulk Edit.
  5. Choose Do not allow in the drop-down box and click Update.
The Posts page on the WordPress admin panel, showing how to disable the comments

The first three methods are all about disabling comments globally or in bulk. But it’s possible to disable and enable comments on individual posts or pages one by one.

Bear in mind that this method can override whichever global setting you have in place. It grants you more flexibility over comment sections and is handy when you want to change the comments settings for only one post.

There are two ways to do this.

The first option is to do it from the WordPress post or page editor. The steps should be similar whether you’re using the Gutenberg editor or the Classic editor.

  1. In the panel located on the right, scroll down until you find the Discussion box.
  2. Uncheck Allow comments.
  3. Save changes by clicking Publish or Update.
The settings section in the Gutenberg editor, showing where to disable the comments

If you use the Gutenberg editor and can’t find the Discussion box, click the three-dotted button located in the top right corner. Go to Preferences > Document settings. Check Discussion, and the option should now appear.

If you use the Classic editor, bring up the Discussion box by selecting Screen Options and checking the Discussion box.

The second option is to use the Quick Edit feature that you can find in the Posts or Pages admin menu.

  1. Go to Posts > All Posts or Pages > All Pages if you want to make changes to a page instead.
  2. Hover over the item title which comments you want to disable and click Quick Edit.
  3. Uncheck Allow Comments.
  4. Click Update.
The Posts page on the WordPress admin panel, showing where to enable Allow Comments

When you upload media files to your website, WordPress automatically creates individual pages for them. These pages can receive comments just like a regular post or page. More often than not, websites don’t need comment sections on their media files.

There are two ways to disable comments under media files.

You can disable them individually, similar to how you’d do it for posts and pages in the fourth method.

  1. From your WordPress admin area, go to Media > Library.
  2. Find a media file and choose Edit.
  3. Under Discussion, uncheck Allow comments.
  4. Click Update.
The Discussion section in the Media page, showing where to disable the comments

Unfortunately, unlike posts, pages, and custom post types, there’s no way to apply this setting to media files using Bulk Actions. So this option is less feasible for sites with a massive library of media.

The second option lets you quickly disable comments under all media files on your site. To do this, you’ll have to copy and paste a custom code to your theme’s functions.php file.

Before you proceed, keep in mind that incorrectly adding code snippets to themes can damage sites. To be safe, make sure to create a backup of your site so that you can restore it to the previous version in case anything goes wrong. Also, consider creating a child theme that won’t mess with the parent theme’s settings.

1. To locate the functions.php file, go to Appearance > Theme Editor.

The Appearance menu on the WordPress admin panel, showing where to click the Theme Editor

2. Select functions.php on the right.

The Theme Editor page on the WordPress admin panel, showing where to click the functions.php file

Then, copy and paste the following code snippet to the file:

function disable_media_comment( $open, $post_id ) {
 $post = get_post( $post_id );
 if( $post->post_type == 'attachment' ) {
 return false;
 }
 return $open;
}
add_filter( 'comments_open', 'disable_media_comment', 10 , 2 );

4. Click Update File to finalize the changes.

Disable Comments WordPress plugin banner

If you prefer a quick and easy way to disable comments in WordPress, the Disable Comments plugin could be a good option.

While the manual methods offer more flexibility, they’re undoubtedly more time-consuming, especially if your website has a lot of content and many unwanted comments to take care of.

This plugin allows users to disable all comments with a single click. Alternatively, you can also choose to disable comments on your posts, pages, or media only.

If you own a multi-site network, you’ll be able to disallow comments on multiple websites, too. The Disable Comments plugin also gives you the ability to remove the “Comments” links from the admin menu and admin bar of your WordPress backend altogether.

Once you install the WordPress plugin, go to Settings > Disable Comments on your WordPress admin area.

The Settings section on the WordPress admin panel, showing where to access the Disable Comments plugin

The settings are categorized under two tabs, Disable Comments and Delete Comments. The former removes the comment form, and the latter removes the comments you’ve received on your WordPress site.

Under the Disable Comments settings, you can choose whether you want to turn off WordPress comments Everywhere or On Specific Post Types.

Unlike the manual methods, the settings applied by this plugin can’t be overridden by individual post settings. Therefore, Method 4 won’t work anymore.

If you still want some comments on your site, be sure to select the correct post type or opt for the manual methods instead.

The Disable Comments plugin page, showing how to disable comments on specific post types

Under the Delete Comments settings, you have three options. Choose Everywhere if you want to delete all comments on your site.

If you want to keep some comments, select On Certain Post Types to choose which comments under which post type you want gone.

Or you can choose to Delete Certain Comment Types if you want specific comments removed, for example, those under WooCommerce product reviews.

The Disable Comments plugin page, showing how to disable comments everywhere

You can disable all comments on your WordPress site by copying and pasting a couple of code snippets to your theme’s page.php and single.php file.

This option is only recommended if you’ve exercised best practices related to editing the source code of WordPress themes, including creating a backup of your site and creating a child theme.

First, try replacing a line of code on your page.php file to turn off comments on all of the pages.

1. On the main dashboard, go to Appearance > Theme Editor.

The Appearance menu on the WordPress admin panel, showing where to access the Theme Editor

2. Select page.php on the right side.

The Theme Editor on the WordPress admin panel, showing where to click page.php

3. Next, find the following code in the file:

<?php comments_template( '', true ); ?>

Replace it with this one:

<!-- Begin Comment 
<?php comments_template( '', true ); 
?> End Comment →

Click Update File to save the changes.

4. Then, replace a line of code in your single.php file to turn off comments on all your posts.

The Theme Editor on the WordPress admin panel, showing where to click the single.php file

Find the following code:

<?php comments_template(); ?>

And replace it with the following:

<!-- Begin Comment
<?php comments_template(); ?>
End Comment →

Finally, select Update File. Now, the comments on all your pages and posts should be disabled.

Conclusion

In this article, we’ve covered seven different methods on how to disable comments on WordPress.

No matter which method you decide to use, we hope this article has helped you gain more control of your website. Best of luck.

How to Disable Comments on WordPress: 6 Easy Methods

WordPress is a powerful content management system that allows you to easily create and manage your website. One of the great features of WordPress is the ability to enable or disable comments on your posts and pages. Disabling comments can be a great way to keep your website free from spam and unwanted comments.

In this article, we’ll show you how to disable comments on WordPress in 6 easy methods.

Method 1: Disable Comments on All Posts and Pages

The easiest way to disable comments on WordPress is to disable them on all posts and pages. To do this, go to Settings > Discussion in your WordPress dashboard. Then, uncheck the box next to “Allow people to post comments on new articles”.

Method 2: Disable Comments on Individual Posts and Pages

If you don’t want to disable comments on all posts and pages, you can disable them on individual posts and pages. To do this, go to the post or page you want to disable comments on. Then, scroll down to the “Discussion” section and uncheck the box next to “Allow comments”.

Method 3: Disable Comments on Specific Post Types

If you want to disable comments on specific post types, such as pages or custom post types, you can do so by going to Settings > Discussion in your WordPress dashboard. Then, scroll down to the “Default article settings” section and uncheck the box next to the post type you want to disable comments on.

Method 4: Disable Comments Using a Plugin

If you don’t want to manually disable comments on each post or page, you can use a plugin to do it for you. There are several plugins available that allow you to easily disable comments on WordPress. We recommend using the Disable Comments plugin.

Method 5: Disable Comments Using Code

If you’re comfortable with code, you can also disable comments on WordPress using code. To do this, add the following code to your theme’s functions.php file:

function disable_comments_post_types_support() {
    $post_types = get_post_types();
    foreach ($post_types as $post_type) {
        if(post_type_supports($post_type, 'comments')) {
            remove_post_type_support($post_type, 'comments');
            remove_post_type_support($post_type, 'trackbacks');
        }
    }
}
add_action('admin_init', 'disable_comments_post_types_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($comments) {
    $comments = array();
    return $comments;
}
add_filter('comments_array', 'disable_comments_hide_existing_comments', 10, 2);

// Remove comments page in menu
function disable_comments_admin_menu() {
    remove_menu_page('edit-comments.php');
}
add_action('admin_menu', 'disable_comments_admin_menu');

// Redirect any user trying to access comments page
function disable_comments_admin_menu_redirect() {
    global $pagenow;
    if ($pagenow === 'edit-comments.php') {
        wp_redirect(admin_url()); exit;
    }
}
add_action('admin_init', 'disable_comments_admin_menu_redirect');

// Remove comments metabox from dashboard
function disable_comments_dashboard() {
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
}
add_action('admin_init', 'disable_comments_dashboard');

// Remove comments links from admin bar
function disable_comments_admin_bar() {
    if (is_admin_bar_showing()) {
        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    }
}
add_action('init', 'disable_comments_admin_bar');

Method 6: Disable Comments on Old Posts

If you want to disable comments on old posts, you can use the Disable Comments on Old Posts plugin. This plugin allows you to easily disable comments on posts that are older than a certain number of days.

We hope this article helped you learn how to disable comments on WordPress. You may also want to check out our guide on how to manage and moderate comments in WordPress.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
Jassweb, Rai Chak, Punjab, India. 143518