How To Turn off Comments In WordPress

How To Turn off Comments In WordPress 6 Easy Ways

Don't Hesitate to Share:

If you are looking for how to turn off comments in WordPress then this article is for you. Comments are completely unnecessary for some websites. Sometimes it’s a matter of choice, for not want people to comment on your pages.

Posts are fine, but why do WordPress pages would need a comments section? Also, there’s the fact that some comments present a security risk if they contain suspicious links that visitors unknowingly click on.

If you want to learn how to turn off comments on a WordPress site, you have come to the right place. In this article, we will explain step-by-step methods on how to turn off comments in WordPress.

7 Ways to Disable Comments in WordPress

  • Method #1. How to Turn off Comments in WordPress on All Published Posts and Pages
  • Method #2. How to Turn off Comments in WordPress on Future Posts
  • Method #3. How to Turn off Comments in WordPress on specific posts and pages
  • Method #4. How to Turn off Comments in WordPress for Individual Posts and Pages
  • Method #5. How to Turn off Comments in WordPress on Media 
  • Method #6. How to Turn off Comments in WordPress Using a WordPress Plugin

Learn How to Turn Off Comments in WordPress in 6 Ways

There are various reasons why you’d want to learn how to turn off comments in WordPress, and not every reason is going to lead you to the same solution. So, whether you want to disable comments for certain posts, disable comments on all pages, create tougher controls over who can comment, or just get rid of that annoying comment spam, there are fixes for you:

Method #1. How to Turn off Comments in WordPress on All Published Posts and Pages

If you want to turn off all comments on a website, this method is for you. Once you apply the following changes, Comments on all existing pages and blog posts will be removed. First, you will have to delete all of the existing comments under every post and page.

  1. Navigate to the WordPress admin dashboard. 
  2. Go to the Comments section. You’ll see a table detailing every comment you’ve received on your website. 
  3. Select all the comments by checking the box located in the top left corner of the table. 
  4. Select Move to Trash option from the Bulk Actions drop-down box. 
  5. Click Apply.
Wordpress Comments Remove - How to Turn off Comments in WordPress

At this point, you have deleted all existing comments from your website. But the comment form will still remain. It will allow people to post comments below your posts and pages.

Let’s turn off the comment form under every post and page to fix this for future posts. And for you, there are two easy ways to do this.

The first way to use: Bulk Actions

1. Navigate to Posts > All Posts. Here you will find a table containing all the posts you have published.

dashboard all posts

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

bulk options edit

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

Comments do not allow

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

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

dashboard all pages

Important note: Every page created on WordPress has the comments section disabled by default. If there are comments present on your pages, you might have changed the settings before. To fix this, you have to follow the same steps for your pages as well.

The second alternative option is to use the Automatically close comments on posts older than (#) days setting.

1. Go to Settings > Discussion.

Settings discussion

2. Inside Discussion Settings > Other comment settings, find the Automatically close comments on posts older than (#) days setting. Fill the field with 0 to disable comments for all posts.

Automatically close comments on-posts

This setting method is a bit faster than the first option we did (bulk edit). Unfortunately, you can’t apply this method to pages. If you have comments on your pages and want to turn them off in bulk, follow the first option.

Method #2. How to Turn off Comments in WordPress on Future Posts

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

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

Settings discussion

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

allow people to submit posts

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

Method #3. Turn Off WordPress Comments on Specific Posts And Pages

If you still want to have some active comment sections, you might want to turn off comments on specific posts or pages only.

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

  1. Go to your WordPress admin dashboard and navigate to Posts > All Posts.
  2. Find the posts that you want the comments disabled and check their respective boxes.
  3. Click Edit from the drop-down box and click Apply.
  4. Make sure that you’ve selected the right posts under Bulk Edit.
  5. Select Do not allow in the drop-down box and click Update.
Specific post comment do not allow

Method #4. How to Turn off Comments in WordPress for Individual Posts and Pages

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

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

And for you, there are 2 simple ways to do this.

The first way to do it is from the WordPress post or page editor. The steps should be similar for the Gutenberg editor or the Classic editor. It doesn’t matter which one you’re using.

  1. In the panel located on the right side, scroll down to find the Discussion box. 
  2. Uncheck Allow comments. 
  3. Hit the Publish or Update button to save changes.
Uncheck Allow Comments

Method #5. How to Turn off Comments in WordPress on Media 

When you upload media files to your site, WordPress automatically creates individual pages for them. These pages will receive comments just like a regular post or page. Most of the time, websites don’t need comment sections on their media files. 

There are two ways to turn off comments under media files. 

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

  1. From your WordPress admin dashboard, click Media > Library. 
  2. Select a media file and click Edit More Details. 
  3. Under Discussion, uncheck Allow comments. 
  4. Click Update.
Media Allow Comments Check

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

The second option lets you quickly turn off comments under all media files on your site. To do this, you will 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 your site. To be safe, make sure to keep a backup of your site so that you can restore it to the previous version in case anything goes wrong. Also, create 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.

Theme File Editor

2. Select functions.php on the right.

functions.php

3. Then, copy and paste the code given below 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 on Update File button to finalize the changes.

Method #6. How to Turn off Comments in WordPress Using a WordPress Plugin

Diisable comments plugin

If you prefer a fast and easy way to turn comments in WordPress, the Disable Comments plugin could be a great option. 

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

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

If you run a multisite network, you’ll be able to disallow comments on multiple websites, as well. The Disable Comments plugin also gives you the power to remove the “Comments” links from the admin menu and admin bar of your WordPress backend all at a time. 

After installing the WordPress plugin, go to Settings > Disable Comments on your WordPress admin area.

Settings Disable comments

There are two types of settings category, Disable Comments and Delete Comments. The former deletes the comment form, and the latter deletes the comments you’ve received on your WordPress site.

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

The settings applied by this plugin can’t be overridden by individual post settings, unlike the manual methods. Therefore, Method 4 will not work anymore.

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

Disable comments plugin settings

You have three options under the Delete Comments settings. First, select the Everywhere option if you want to delete all comments on your site.

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

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

Delete Comments settings

Conclusion

In this article, we’ve covered seven different methods to show you how to turn off comments in WordPress. 

You can use any method you want, and we hope this article has helped you gain more control of your site—best of luck.

Did we miss anything? Please let us know in the comments below, and we’ll be happy to answer them for you. Thank you.

Read more: How to Update WordPress Theme: 6 Easy Steps

Don't Hesitate to Share:

Subscribe for the Latest Updates from Us

Join us with 40,000+ Happy Members

Sister Concern

Copyright © 2008-2022 by SmartDataSoft. All Rights Reserved.