Go To Namecheap.com
WordPress

How to Disable Comments in WordPress

Why would you want to turn off comments in WordPress? Comments breathe life into a blog. They are a great way to interact with your visitors and can boost SEO, right? 

There are some drawbacks to WordPress comments, however. They can be spammy, self-promotional, and sometimes hurtful. To top it off, monitoring them eats into your productive time. 

With WordPress, it’s possible to disable comments on posts, pages, or your entire website. In this post, we’ll show you how to disable WordPress comments, including methods to keep a healthy debate going by controlling your spam comments instead. 

Disable Comments on Future Posts

Whether you’re new to WordPress or want to restrict comments on an existing website, you can turn off the comments on all future posts. 

To begin, head to Settings and Select Discussion from the drop-down menu. From this page, you get all possible Discussion Settings. Uncheck the option to “allow people to submit comments on new posts” and click the Save Changes button.

Disable future comments

This disables comments on all of your future posts. You can allow or disallow comments on a specific post without changing this setting.

Disable Comments on a Specific Page or Post

You just turned off comments on all your pages by default, but you can still enable comments on individual pages or posts. From your sidebar, head over to Pages, and the All Pages view. 

Find the page you want to enable (or disable) comments, and hover your cursor over the page title and click Edit. As usual, this takes you straight to your Document settings. This time, you want to navigate down to Discussion. 

enable individual comments

Now click the upturned triangle icon, you’ll see the option to ‘Allow comments.’ Uncheck the box to disable comments on this individual page and click Update to save your changes. 

That’s it. If there are more WordPress pages you’d like to turn off comments on, follow the same process. It’s also possible to disable comments in bulk which we’ll cover next.

Disable Comments in Bulk

To disable comments on posts and pages in bulk, you first need an overview of everything you’ve posted. Start by heading to Posts » All Posts then follow these steps:

bulk disable comments
  1. Check the box next to the blog title
  2. Next to each post that you wish to disable the comments on, Select Edit from the drop-down box above
  3. Click Apply. 

Now you can perform bulk actions, including turning on and off comments for all of your selected posts. From the Comments dropdown box, select “Do not allow” and click Update to confirm your changes. Comments on your selected posts have not been disabled. Follow the same process to disable comments on selected pages in bulk.

bulk edit of comments

Disable Comments on Media Files

Posts with deactivated comments can still receive comments on media files. When you upload an image to WordPress, an attachment file is created, and this file continues to receive comments, even if you’ve disabled them on the related post by following any of the methods above. 

That’s why media files also need to be silenced! To disable comments for these attachments, visit your media library. 

remove media comments
  1. Make sure that you are in the correct view.
  2. Select the media file and hit Edit.

You’ll find a Screen Options tab on the top right-hand side of the page. From here, you can disable comments — just un-check the Comments box.

screen options - comments

Unlike with posts and pages, it’s not possible right now to bulk edit media files in WordPress through the typical user settings. You can do this by adding some code to your theme file. 

Disable Comments on All Media Files

To disable comments on all of your media files, you need to add some code to your functions file. Head to your Theme folder from your WordPress admin, and add the following code to functions.php:

function filter_media_comment_status( $open, $post_id ) {
$post = get_post( $post_id );
if( $post->post_type == 'attachment' ) {
return false;
}
return $open;
}
add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 );

Now you can rest assured that no one is commenting on your media file. If you’re not comfortable toying with code, you can use a plugin such as the ‘Disable Comments Plugin’ to get the same result. Once you’ve installed and activated your plugin, head to Settings from the admin panel, select Disable Comments, then check Media, that’s it. 

Disable Comments With a Plugin

With over one million active installs and a five-star rating, the Disable Comments plugin is an extremely popular choice to manage comments in WordPress. You can control comments over your entire website,  or disable or enable comments for a specific page or post. If you don’t want any comments at all, you can block them in one click.

plugin screenshot

Keeping Comments Rolling — Block out the Spam Instead 

The comment section of every news source of a blog is a hotbed for spammers to advertise themselves. If you’re on the fence about removing all your comments, and it’s the spam and bot comments that’s troubling you — there’s another way around it. Follow some basic spam protection techniques:

  • Dissuade Spammers with comment Captcha – Granted, captchas are neither an attractive nor user-friendly addition to your comment form, but they help protect from spammers. There are several plugins to add Captcha. To add a Google Recaptcha submit button, install the Advanced noCaptcha & invisible Captcha plugin.
  • Requiring the user to register – Registration goes a long way to bringing down spam, and naturally, the volume of comments in their entirety. Arguably not the most user-friendly tactic but, registration shouldn’t be too much of a problem for people leaving genuine comments — if you’ve got an engaged community. 
  • Control comments with a plugin –  Akismet is the go-to antispam plugin. Made by the team behind WordPress.com this plugin is automatically included in all WordPress installs, and is designed to work nicely in the background. When a visitor comments on a post or page, your blog runs it through Akismet. Akismet gets to work behind the scenes, analyzing the comment, within moments, they’ll tell you whether the comment is spam or worth keeping. 
  • Add moderator approval – Before a comment is published, you can personally check for bots and spam — before it appears on the front end of your website. You’ll find it on your dashboard in the comments queue where you can if it gets published.
  • Closing comments – Scammers target older posts, so many users close comments to reduce spam significantly. To keep the debate active with a less ‘hands-on’ approach, you can specify the number of days after which it’s no longer possible to comment. This option is available under Settings>Discussion. Check the field that says, “Automatically close comments on articles older than 14 days.” You can change the number according to your needs. 
man and woman adding shield to website

Final Word

Comments aren’t for everyone, and as we’ve displayed, there are several ways of dealing with them. To keep comments open, it’s best to take a hand-on approach and follow one of the methods we’ve covered to ensure you’re not overloaded with spam or otherwise unwanted comments. 

Aside from comments, there are many ways scammers can target you, and it’s not always online. All domain names are registered in the WHOIS domain database. The record for your domain is public, and spammers often crawl here for email addresses. To make sure you’re not a target of this type of spam, make sure you use ‘Whois’ protection to hide your personal contact information. Namecheap offers free WhoisGuard on most domains, including those registered with EasyWP.

Was this article helpful?
0
Isobel Weston avatar

Isobel Weston

More articles written by Isobel.

More articles like this
Next Post

Which Domain Extensions are the Most Popular?

Read More