Comments can be a great source of discussion and feedback. But it can also be a massive headache with spam and inappropriate comments.
In this article, we will describe how to disable WordPress comments sitewide or only for specific posts. Additionally, you can check out our ultimate guide to disabling WordPress comments. You may also be interested in our article regarding the best WordPress comment plugins.
How to Disable WordPress Comments Sitewide?
To disable WordPress comments sitewide you need to take the steps below:
- Go to Settings > Discussion.
- Set ‘Automatically close comments on articles older than X days’ on 0.
- Go to Comments from the dashboard.
- Select all comments.
- From Bulk Action choose Move to Trash.
This does the trick. Below we’ve detailed these steps as well as suggested other ways to disable comments.
How to Disable Comments for Future Posts?
In WordPress, we can manage the comment section of our pages or posts at any given time. However, disabling comments for every single page or every single post may take a long time. Thus, in this article, we will talk about how to disable WordPress comments sitewide at once.
The easiest way to disable comments is through WordPress settings. To do this simply head over to your WordPress settings, then click on “Discussion” uncheck allow comments then click on save. This will disable the comments for your new posts.
To disable comments for your previous posts check the box next to the line stating “automatically close comments on articles older than … days”. Make sure you input “0” for the number of days. This method will also disable comments for any new posts you publish.
Another way is modifying your template. But we recommend the first way. Because if anything goes wrong with your template, your website may run to some trouble. However, if you are familiar with programming, follow the steps below.
To disable comments on your pages, enter template editor and click on page.php to edit it. Then locate the code below:
<?php comments_template( '', true ); ?>
Then replace it with:
<!-- Begin Comment
<?php comments_template( '', true ); ?>
End Comment -->
To disable comments on your posts, you should follow the previous step but this time find and edit single.php and locate the code below:
<?php comments_template(); ?>
Replace it with this:
<!-- Begin Comment
<?php comments_template(); ?>
End Comment -->
When you turn a piece of code into a comment, it won’t have any effect on your website and only can be seen through code editors.
How to Delete WordPress Comments?
After disabling the comment section, we need to delete the previous comments placed on our website. So there is no trace left behind. To do this, first, you need to enter your comments settings to view all the comments on your website.
Now you need to select the move to trash option from the bulk actions dropdown menu. Keep in mind, if your comments are more than a page, you will have to do this for every single page.
How to Disable Comments for One or More Posts?
If you wish to disable comments for one post or few posts or you wish to disable comments for all of your posts and enable them for one or few posts, you have to do so through editing each post.
First, select the page you wish to edit. Then, if you don’t see the discussion box, enable it from the top left corner of the classic WordPress editor. If you are using Gutenberg editor you must select and enable discussion from the drop-down menu.
After enabling the discussion section, you can then choose whether you want to check or uncheck comments on that particular post.
How to Disable WordPress Comments using Plugin?
If you wish to disable comments on your WordPress website via a plugin, we recommend “Disable Comments”. This plugin allows website managers to manage the comments settings of posts and pages in WordPress.
Using disable comments is very simple and close to using WordPress settings.
Do you prefer to keep your comments section enabled or you much rather have them gone? Our comment section is always enabled.