WordPress Disable Comments

Updated on November 13, 2017

If you aren’t using them, disabling comments can be a great way to reduce spam and speed up your WordPress website. Follow these quick and easy options below on how to in WordPress disable comments.

WordPress Disable Comments

There are actually a few different ways to disable comments in WordPress. You can do it within the WordPress options, with a plugin, or with code.

1. Disable Comments within the WordPress Options

The first way to disable WordPress comments is to simply use the already built-in options within WordPress. However, there are a few drawbacks to doing it this way.

Option 1

Within a WordPress post or page itself, you can click into the “Screen Options” at the top right and enable the ability to see the “Discussion” options.

enable discussion option wordpress

Enable discussion option

Then scroll to the bottom and you will have the option to turn off and or “not allow comments” on your blog post or page. The one drawback to this is that is has to be done on an individual post or page level, there is no global option.

disable comments within a post

Uncheck allow comments

Option 2

The second option you have is to globally disable discussions. You can do this by clicking into “Discussion” under Settings in your WordPress dashboard and then un-checking the option “Allow people to post comments on new articles.” The drawback to this method though is that it doesn’t affect older articles, only new ones.

disable discussion on wordpress posts

Uncheck allow people to post comments on new articles

If you need more control and simply want to globally disable all comments at once, we recommend using one of the following methods below.

2. Disable Comments with Plugin

One of the easiest ways to disable comments is to use a free plugin like Disable Comments.

wordpress disable comments plugin

Disable comments plugin

This plugin allows administrators to both globally disable comments and also disable them by post type. As of writing this, the plugin has over 1 million active installs with a 4.9 out of 5-star rating. You can see below within the plugin settings, your options are pretty straightforward. You can disable comments everywhere with one click, or disable them on posts, pages, or media post types.

wordpress disable comments globally

WordPress disable comments everywhere

3. Disable Comments with Code

If neither of the above options work for you or you would rather do it with code, you can simply remove the comment section from appearing within your WordPress theme with simple HTML comments.

Important! Editing the source code of a WordPress theme could break your site if not done correctly. If you are not comfortable doing this, please check with a developer first.

In your page.php file, simply replace the following code:

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

With this code:

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

That removes it from your pages. And then to remove it from your blog posts, navigate to your single.php file and replace the following code:

<?php comments_template(); ?>

With this code:

<!-- Begin Comment
<?php comments_template(); ?>
End Comment -->
Was this article helpful?
No, or there was something off

Hand-picked related articles

Use WordPress?

Join 20,000+ others who get our FREE weekly newsletter with WordPress tips on how to drive more traffic and revenue to your business!

You have Successfully Subscribed!

Send this to a friend