
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.
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.
2. Comments Can Be a Security Risk
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.
3. Running a Store and Don’t Need Comments
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.
There are various methods to turn off WordPress comments. In this article, we will cover different options.
If you want to disable all comments on a website, this method is for you as you’ll remove comments on all existing pages and blog posts.
First, delete all of the existing comments under every post and 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.


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

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

Note: Every page created on WordPress has the comments section turned off by default.
The second option is to use the Automatically close comments on posts older than … days setting.

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.

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.


Upon applying this setting, your WordPress site won’t allow people to post comments under future posts.
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.

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.
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.

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.
Note: 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.

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.
You can disable them individually, similar to how you’d do it for posts and pages in Method 4.

Note: Unfortunately, unlike posts, pages, and custom post types, there’s no way to apply this setting to media files using Bulk Actions. Hence, 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.


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

If you prefer a quick and easy way to disable comments in WordPress, the Disable Comments plugin could be a good option.
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.

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 already 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.
Note: 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.

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.

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.


Next, find the following code in the file:
Replace it with this one:
Is this blog helpful?
0
0
Popular Posts
We're sorry what you were looking for. please try another way
Popular Categories
Tags

How do you link your WhatsApp to your website, business or personal number to WhatsApp's click to chat feature? The click to chat feature allows you to begin a chat with someone without having their phone number saved in your phone's address book. You can create a link that will allow you to start a chat with any person as long as you know their phone number. Additionally, the person needs to have an active
Read Blog
Before we start with the 10 Best Domain Registrars in Kenya, let's learn what a domain name is. A domain name is a what identifies a website on the Internet. Literally, it’s the name of the website. Domain registrars are companies that allow individuals and businesses to register domain names for their websites and also for customized email addresses. The
Read Blog
While installing WordPress themes until you find the right one is a common practice, keeping your theme directory organized by deleting the ones you’re not currently using is highly recommended by WordPress experts. There are multiple ways to delete a theme in WordPress ‒ via the WordPress dashboard or through SFTP. This article will explain these methods along with their respective steps. We will also help you decide which WordPress themes you should keep and which ones to delete.</p
Read Blog