How to Disable Comments in WordPress (6 Easy Ways)

Do you want to learn how to disable WordPress comments? While comments are a terrific way to communicate with your site visitors, some website owners do not want to allow comments on their site.

WordPress allows you to disable comments on specific posts, pages, custom post types, or even completely remove comments from your entire website.

In this post, we’ll show you how to disable comments in WordPress step by step.

Why Disable Comments in WordPress?

Here are some reasons why you might want to turn off WordPress comments:

  • Prevent spam: Almost a quarter of web traffic comes from bad bots. To prevent these attacks from harming your comment section, consider removing comments entirely or adding a security plugin.
  • Save time: Moderating and replying to comments is necessary for engagement and safety, but it takes up valuable time.
  • Most static pages don’t need comments: Especially your most important pages, such as your home page, about page, contact page, and pages describing your company and product. WordPress automatically bans comments on pages, so this isn’t an issue unless you’ve changed the default setting.
  • Use a comment plugin: You prefer to use a commenting plugin instead of WP’s default comment feature to handle comments.
  • Increase page speed performance: Instead, you might consider lazy loading your comments as an alternative to boost performance without cutting comments.
  • They aren’t needed on a WordPress post: For example, you might not want a comment section on an announcement post.
  • They don’t serve website goals or brand: You might prefer not to have comments on your posts if you believe that comments will not add value to your content. Comments could even make your website appear unprofessional if unmoderated and inappropriate.

6 Ways to Disable Comments in WordPress

Let’s dive in and go through all the options to turn off your WordPress comments partially or completely.

1. Disable Comments on Future Posts

If you’ve just started your WordPress blog, you can quickly disable comments on future posts.

To do so, go to Settings » Discussion from your WordPress admin panel.

On this page, uncheck the option that says Allow people to post comments on new articles and then click on the Save Changes button to save your settings.

Disable Comments on Future Posts

This will disable comments on all your future posts. However, if you wish to allow or disallow comments on a specific post, you can do so without changing this setting.

2. Turn off Comments on a Specific Page or Post

Comments are disabled by default on all of your pages and posts.

However, WordPress allows you to enable or disable comments on particular pages and posts.

Simply head over to Posts » All Posts from your WordPress admin dashboard. On the next page, hover your mouse cursor over the post title that you want to enable or disable comments for and click the Edit link.

WordPress Post Edit option

Next, look for the Discussion meta box and uncheck the checkbox next to Allow comments. This meta box might be hidden. If so, display it by checking Discussion in Screen Options.

Discussion Metabox

Click on the Update button to save changes.

However, if you want to enable comments selectively, you can just check the box to enable it for certain posts.

You can use the same way to disable comments on individual pages.

3. Turn Off Comments on posts and Pages in Bulk

Want to turn off comments on all of your published posts and pages without having to do it one at a time? You can do it without using a plugin.

To start, navigate to Posts » All Posts to see all of your posts.

Then, select all posts, choose Edit from the Bulk Actions dropdown box, and click Apply.

Edit Posts in Bulk

You may now change the author name and turn off comments for all selected posts in bulk.

Select Do not allow from the comments dropdown box and click Update. This will disable comments on all of your selected posts.

Disable Comments on Posts in Bulk

You can use the same process to disable comments on your pages.

4. Delete All WordPress Comments

While the methods described above disable comments on your posts and pages, they do not delete existing comments from your WordPress site.

To delete all comments from your site, go to Comments from your WordPress admin dashboard.

Then, select all comments, select Move to Trash from the Bulk Actions dropdown box, and click Apply. This will remove all existing comments from your site.

Delete All WordPress Comments

5. Disable Comments on Media Files in WordPress

Even if you disable comments on your posts and pages, comments on your media files will remain available. You can deactivate comments on individual media attachments from the Media Library or in bulk by editing some source code.

Disable Comments on a Single Media Attachment

Go to Media » Library from your WordPress admin dashboard.

WordPress Media Library

Now, select the media item you want to edit.

Next, click on the Edit more details from the right panel.

WordPress Media Edit More Details

On the next page, look for the Discussion meta box and uncheck the checkbox next to Allow comments. This meta box might be hidden. If so, display it by checking Discussion in Screen Options.

Discussion Metabox

Click on the Update button to save changes.

Unfortunately, unlike posts and pages, there’s no way to apply this setting to media files using Bulk Actions. As a result, this solution is less practicable for sites with a large media library.

Disable Comments For All Media Attachment

This option allows you to easily disable comments on your site’s media files. You’ll have to copy and paste the code snippets below into your theme’s functions.php file.

Before you start, keep in mind that incorrectly adding code snippets to themes can result in site damage. To be safe, create a backup of your site so that you may restore it to a prior version if something goes wrong.

Go and open your functions.php file and copy and paste the below code snippets into it.

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 );

Remember to save your changes after you’re finished.

6. Disable WordPress Comments Using a Plugin

If you don’t want to disable the comments manually, you can do so with a single click using the Disable Comments plugin.

It allows you to turn off comments completely on your WordPress site. You can also disable them for specific post types such as posts, pages, media, and others. It also hides the comment form and disables the display of previously submitted comments.

First, install and activate the Disable Comments plugin.

After activating the plugin, navigate to Settings » Disable Comments from your WordPress admin dashboard.

When you choose the Everywhere option, you can turn off comments on your entire WordPress site. Additionally, the plugin will remove the comments menu item from your WordPress admin area.

When you choose the second option, On Specific Post Types, you can disable comments on specific posts, pages, or media.

Disable Comments Settings

Click on the Save Changes button to finish the process.

How to Clear the ‘Comments Are Closed’ Message in WordPress

After you disable comments, your pages may display a “comments are closed” message at the bottom. To clear the message, follow these steps:

To start, use an FTP client to connect to your WordPress site. Once you’ve connected, navigate to the wp-content/themes folder.

Next, find the “comments.php” file and rename it to “comments_old.php”.

After that, create a new file and name it “comments.php”. Doing this should remove the message.

If your theme doesn’t contain a “comments.php” file, contact the theme’s developer and ask how to resolve this issue.

Conclusion

Sometimes you’ll want to encourage your website’s users to ask questions and start conversations with one another. However, if you want to avoid spamming content or improving performance, you should disable comments on WordPress.

There are three main ways to do so. You can disable comments on WordPress by doing the following:

  • Using WordPress built-in option.
  • Use WordPress plugins such as Disable Comments.
  • Custom code.

We hope this step-by-step guide helps you learn how to disable comments in WordPress. You may also want to see more posts from our blog if you are a beginner.