WordPress started life as a blogging platform. Years later, it’s now a Content Management System (CMS) that is used with over 40 percent of the web. Along the way, some of classic blogging staples have fallen out of favor. This means there are many sites that want to disable comments in WordPress.
Despite this feeling surrounding commenting, there are a lot of benefits to letting users engage with your content. Still, if you want to cut out the comments, there are a few ways to do so.
As such, this post is going to show you how to disable comments in WordPress. We’ll look at the different places within WordPress you can change settings, and also discuss some extra techniques to complete rid your site of comments.
In 2003, WordPress was a blogging platform through and through. It had all the hallmarks you’d expect: theming, blog-specific settings, and commenting functionality.
Comments are a key part of a blog, and it’s fair to say that they have become more prominent as WordPress has evolved and grown.
We’ll discuss more about the benefits later, but it’s also fair to say that as WordPress has evolved, some site owners have pushed back against commenting.
This is because of the gradual change from blogging platform to CMS. As WordPress became adept at creating other types of site, comments weren’t as central to some users. Because of this, the platform has functionality in place to disable commenting on your site. Again, we’ll get into this in more detail later.
Before we get into how to disable comments, it’s worth talking about why you’d want to have them for a business-focused site. It’s easy to consider them superfluous to requirements, but this isn’t the case.
In fact, comments can offer more value than other forms of engagement, for a few reasons:
While there are more benefits we could mention, this is beyond the scope of the article. Still, if you thought comments were only for a blog site, it’s worth rethinking that mindset. Comments can be a valuable marketing arm, and cultivating a readership with them is a solid strategy.
We’ve covered what’s good about comments, but this doesn’t mean they’re always necessary. Here are a few points on why you wouldn’t want comments on your site:
It’s also worth noting that there are ways to cut down on the amount of moderation and engagement you do across your site’s comments. Solutions such as closing comments after a certain period of time, and removing comment URLs are an alternative to disabling comments in WordPress altogether.
Still, if it’s something you’re set on, we have the methods coming up next.
For a task that’s simple on the surface, there are a lot of options for disabling comments in WordPress. Taking a broad brush, here are the two primary ways of getting the job done:
When we dig into these options, we’ll also detail specific settings to help you disable comments and leave no trace. To finish the article off, we’ll note how to disable media comments, and how to delete existing ones.
The first port of call to disable comments in WordPress is the platform’s own settings. To find them, head to the Settings > Discussion page within your WordPress dashboard:
There are a wealth of options here that can help you. In fact, we recommend heading here when you first set up your site.
The main option you’ll want to consider here is Allow people to submit comments on new posts. Unticking this will turn off commenting on a site-wide basis. If you’re working on a brand new site and you don’t want comments, your journey ends here.
Though, for existing site owners, this will only turn off comments for future posts. The rest of this post will help you get rid of pre-existing comments on your site.
Although WordPress provides a full bank of options for handling comments, you can also work with them on a per-post basis. There are a few ways to do this, and the most straightforward is to access a post’s Block Editor screen.
Here, click the Post menu on the right-hand side, and scroll down to the Discussion settings. The checkboxes here will let you disable comments for the post in WordPress:
Note that if you don’t see this box, you’ll need to enable it from the Preferences screen accessed from the ‘traffic light’ menu in the Block Editor:
This will pop up a dialog box, and if you access the Panels screen, you’ll be able to toggle the Discussions metabox:
There are a couple of other places to turn off comments for single posts. If you head to the Posts > All Posts screen in WordPress, hovering over a post and clicking the Quick Edit link will bring up a few options.
Here, you’ll find the Allow Comments checkbox:
Once you check this and save your changes, this will stop users from leaving comments on your posts.
You can also disable comments on multiple posts through the Posts > All Posts screen. First, select the posts you’d like to disable comments on, then click Edit from the Bulk actions drop-down menu, and click Apply:
This will open a set of options, one of which will let you disable comments:
Once you click the Update button, this will disable comments in WordPress for all of the selected posts.
Of course, WordPress wouldn’t be the platform it is without plugins. You can find a suitable solution for almost every need, and comments are no exception.
Far and away the best option here is the Disable Comments plugin by WPDeveloper:
Though, it’s notable that none of the top plugins have been updated in the last few months. Still, while our tests haven’t come up with any issues, you should carry out your own on a staging or other test site.
Once you’ve installed and activated the plugin, you’ll find a preferences menu at Settings > Disable Comments within WordPress:
The plugin will let you carry out some of the basic tasks you can achieve within WordPress, such as disabling comments across your site, and for posts and/or pages:
You can also disable comments made through third-party platforms too, in case they sneak onto your posts.
You’ll also notice options for disabling media comments, and deleting your entire comments database. These are handy features that can also be achieved without the plugin too. Next, we’ll show you how.
WordPress doesn’t offer you a direct way to disable comments on media, although as we noted, plugins can do this. Though, if you don’t want to use plugins, there’s a way to get this done using a code snippet.
Before you press ahead, you should have a clean and current backup in place. Also, using a child theme is a good idea to preserve the changes you make.
What’s more, while you can access the WordPress core file sfrom within your dashboard (and this is the approach we’ll take here), you may also need to access them through Secure File Transfer Protocol (SFTP). In this case, you’ll need a suitable FTP client (such as Cyberduck) to work with.
When you’re ready, access the Appearance > Theme Editor page within WordPress and chose your theme from the drop-down menu on the right-hand side:
Next, under the Theme Files menu, find your functions.php file. It could also be called Theme Functions. Clicking this will open it in the editor.
From here, paste in the following code snippet to the bottom of the file, and save your changes:
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 );
This will bulk disable comments on media files, although it won’t delete existing comments. To do this, there’s a separate method.
All of the methods we’ve outlined here will disable future comments, but not delete existing ones. To wipe your site of comments, you’ll need to carry out a manual method. It’s similar to the bulk enabling you carried out earlier:
This will move all of your comments to the Trash, at which point you can head there and remove them for good.
Comments are an integral part of WordPress for many users. Even so, there are some sites that don’t want users to engage in this way. There’s no right or wrong answer to this, and as such, there are a lot of ways to disable comments in WordPress.
This post has explained how to disable comments in two main ways. Let’s recap:
Do you want to use comments in WordPress, and if not why? Let’s get meta, and leave your thoughts in the comments section below!
Trying to figure out how to start an online course so that you can share…
Considering using LearnDash to create online course content with WordPress? LearnDash is a popular WordPress…
WordPress XML files see a lot of use for me as a content creator, and…
If you’re looking for a way to deliver an online course, complete with all the…
Search Engine Optimization (SEO) is crucial for any website that wants to maximize its traffic…
Kinsta is a notable brand in the WordPress hosting space. The standout aspect of the…