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 with the WordPress options, with a plugin, or with code.
- Disable Comments within the WordPress Options
- Disable Comments with Plugin
- Disable Comments with Code
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.
Still looking for that perfect WordPress host?
- Fully managed
- Secure like Fort Knox
- Free migrations
- Ultimate speed
- Daily backups
- Google Cloud Platform
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.
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.
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.
If you need more control and simply want to globally disable all comments at once, we recommend using one of the following methods below.
One of the easiest ways to disable comments is to use a free plugin like Disable Comments.
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.
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.
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 -->