Blog

How to Disable WordPress Comments: In Settings, With a Plugin, in the Code

How to disable WordPress comments
User
No comments

It is cool, when your blog has comments. You can see the response from the audience, you can communicate and connect with readers or even create a community — around you or the product. In addition, key phrases in comments are also indexed by search engines. But comments can also cause damage, and then it is better to turn them off.

When to disable WordPress comments:

  1. You do not want people to write bad comments. It would be better if there were no comments at all.
  2. You want your readers to communicate on forums or social networks.
  3. You do not want or cannot fight spam in comments.
  4. You think a lot of comments are slowing down your website.

There Are 3 Ways to Disable WordPress Comments

The default configuration of WordPress includes enables comments only for blog posts. But you can also enable them for website pages, and then disable them.

In WordPress settings — for the easiest tasks:
for all planned posts,
for all published posts,
for several published posts,
for one published post,
for one published page,
for images and videos,
delete comments.

With a plugin — when you need more flexible control of the processes:
free plugin,
paid plugin.

In the website code — unlimited opportunities, but programming skills are required. In this article, we will present the most basic opportunities:
delete the comments section from the website,
block comments in all posts and pages.

+ how to limit comments in WP settings: to block a specific user, enable pre-moderation etc.

How to Disable WordPress Comments in Settings

For All Planned Posts

Go to admin’s dashboard, then Settings — Discussion.

Settings, Discussion

In Default post settings disable Allow peoples to submit comments on new post.

Allow comments to new post

In the same section, there is item Allow link notifications from other blogs on new posts, the so-called trackbacks. This is how they work: if a reference to your blog is made in another blog, WordPress gets a notification and automatically presents it as a comment — with a link to the referring blog. Spammers are skilled at using these notifications for their malicious purposes.

In general, modern security plugins disable the interface through which trackbacks work because DDoS attacks are carried out through the same interface. But it is better to disable trackbacks in admin panel as well, in this same section.

For All Published Posts

Go to Settings — Discussions. Tick Automatically close comments on posts older than N days and select 0.

Automatically close comments to posts older than 0 days

If this is too radical for you, you can only disable comments to a few specific posts — read more details below.

For Several Published Posts

Click on Posts in admin’s dashboard to view all posts of the blog. Tick the posts you need and go to Bulk Actions — Edit in the dropdown menu. Press Apply.

By default, you can manage comments to up to 20 posts at a time. You can change this number in settings.

Comments, Disable, Apply

A menu with the lists of actions will open. Select Comments — Do not allowe. Click Update.

Comments, Disable

Here you can also disable notifications and reverse links — trackbacks.

What are trackbacks?

If a reference to your blog is made in another blog, WordPress gets a notification and automatically presents it as a comment — with a link to the referring blog. Spammers are skilled at using these notifications for their malicious purposes.

In general, modern security plugins disable the interface through which trackbacks work because DDoS attacks are carried out through the same interface. But it is better to disable trackbacks in admin panel as well, in this same section.

For One Published Post

Go to the Posts menu, find the post you need and press Edit.

Posts, Edit

In new WordPress versions, the settings are to the right of the main editing window. Find the Discussion section at the very bottom of the page, click on the dropdown list and disable comments. Remember to Update the changes with a button at the top.

Discussion, how to disable WordPress comments

Here you can also disable notifications and reverse links for this post — trackbacks.

What are trackbacks?

If a reference to your blog is made in another blog, WordPress gets a notification and automatically presents it as a comment — with a link to the referring blog. Spammers are skilled at using these notifications for their malicious purposes.

In general, modern security plugins disable the interface through which trackbacks work because DDoS attacks are carried out through the same interface. But it is better to disable trackbacks in admin panel as well, in this same section.

For One Published Page

Go to Pages, select the page from the list and press Quick Edit.

Pages, Properties

Untick Allow comments.

How to disable WordPress comments

For Images and Videos

You can disable comments to the post, but this will not disable comments to images and videos in the post. Because a separate attachment is created for each media file.

To disable comments to them, go to Media, select the image or video and press Edit more details in the lower right-hand corner of its parameters.

To disable comments to images, go to Media,

The editing window will open. Press Screen Options in the upper right-hand corner. The additional settings block will open. Find the Discussion and Comments options and uncheck the boxes next to them.

You can disable commenting on a file in the Discussion section

You can then disable commenting on a file in the Discussion section, which is similar to the corresponding field in the message editor. When you are done configuring, press Update to apply the changes.

Delete Comments

If you want to not only disable comments but also delete old ones, you can also do so in the WordPress admin’s dashboard.

Go to the Comments section, select the desired comments or all comments from the list and in the Bulk Actions dropdown list select Move to Trash. Press the Apply button next to it.

Delete WordPress comments

How to Disable Comments With a Plugin

Disabling comments in WordPress settings is easy, especially if you disable them once and for all. But if you need to manage comments on regular basis: open, close or limit permissions to particular comments, doing so through the settings will be inconvenient.

A more elegant and convenient way to disable comments in WordPress is using a special plugin. There are many of them, so we will tell you only about the two most popular ones: one paid and one free. Each has its pros and cons, see below.

Free Plugin: Disable Comments Partially or Completely

Disable Comments plugin is a very easy-to-use plugin, which does not create extra load on the website. Download the plugin and install it on the website. After activation, go to admin’s dashboard, Plugins menu, find Disable Comments item and click Settings under the name.

Disable Comments

Here you can disable comments on the website completely or only for individual pages and posts.

Disable Comments plugin

When you select the settings, click Save Сhanges. But please note that they cannot be canceled through the WordPress settings. This is useful when there are multiple administrators on the website and you want to be the only one who can enable and disable comments.

Premium Plugin: Disable All Comments and Speed up Your Website

If you plan to disable comments to speed up the website loading, take a look at premium optimization plugins such as Perfmatters. It helps to increase productivity in situations with long page loading times and hidden website clutter.

There are no advanced settings for working with comments in it, but you can simply block them: Parameters tab — Disable comments.

The plugin costs $25 per year per 1 website and it’s biggest value are its optimization tools.

How to Disable Comments in the Code

This method gives maximum control, but the possibilities are limited by technical skills and experience. Standard disabling of comments is relatively simple, so we will tell you about it.

How to Delete the Comments Section From the Website

You can completely delete the comments section from your WordPress theme using basic HTML commands.

Important! Editing the source code involves risks and can lead to a website malfunction. Create a backup as a precaution. We recommend to create backups on regular basis, especially before making any changes to the website.

Open page.php file in an HTML editor of your choice. Find the code line:
<?php comments_template( '', true ); ?>

Replace it by:
<!-- Begin Comment
<?php comments_template( '', true ); ?>
End Comment -->

This action disables comments on all pages of the website and blog: deletes the existing comments and blocks new ones.

How to Block Comments in All Posts and Pages

If you do not want to delete old comments, but only block new ones, find this line of code in single.php file:

<? php comments_template (); ?>

And replace it by:
<!-- Begin Comment
<?php comments_template(); ?>
End Comment -->

This action disables comments in all existing posts and at all website pages. For new pages and posts, the comments will remain active, and if you want to disable them, you will need to repeat this action.

How to Limit Comments in WP Settings

Go to admin’s dashboard, Settings — Discussion. Select the required section:

1. Before a comment appears

Here you can enable manual pre-moderation of comments. In this case, no message will be published until you approve it — an effective protection against spam and swearing.

Also available in this section is the Comment author must have a previously approved comment — a go-ahead for verified users.

2. Comment Blacklist

Here you can add the names, email addresses and IP addresses of those users who are not allowed to leave comments on the website.

3. Other comment settings

Users must be registered and logged in to comment — tick the box to eliminate the need for manual pre-moderation while reducing the spam flow.

Automatically close comments on posts older than N days — select the period after which the posts become "old" and their commenting is disabled.

In the Discussion menu you can find other useful tools — for more specific tasks.

Conclusion

Whether to enable or disable comments is a very personal decision. It is important to objectively assess the value of comments for your website and be ready to manage them constantly and systematically.

Managing WordPress Website on Vps Has Never Been Easier

Vepp is a web panel that helps you get the most out of VPS — performance, flexibility, and security without facing exhausting administration.

 

7 days for free.

 

Try Vepp

How to Maintain a Website

Check out how to automate WordPress launch and maintenance

Watch the video
User
No comments

Subscribe to the articles by WordPress experts


 

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

 

 

 

Installation of WordPress can be manual or automatic. Here we will describe both types.

Vika Fedoseenko

Content manager

A story of a marketer, who wanted to fill Lake Baikal with traffic, but nearly lost the job instead.

John Armstrong

Marketer

Your own shop isn't always about profit, but it's always about challenges. Why does everyone keep quiet about it?

Thomas Smith

Web Developer