Home
/
WordPress Tutorials
/
How to manage WordPress comments

How to manage WordPress comments

Comments are a popular feature allowing visitors to express their opinion and reaction to the content. The comments section usually sits at the bottom of the page. A small text box represents each comment, where visitors share their thoughts on the matter.

WordPress enables comments by default and provides various options for managing them. You can also allow users to post direct replies to a comment, called nested or threaded comments.

Below is an example of a web page’s comments section containing a threaded comment.

Comments on a WordPress website

What are the benefits of having comments in your WordPress website?

Having comments in your website could prove highly beneficial, helping you in several ways. Still, to a large degree, it depends on your website’s purpose.

If your website contains only static pages with general information about your business or landing pages about limited campaigns, comments might be less useful. Instead, consider using a contact form to communicate with your visitors.

However, comments could improve a few key aspects if you run an online store, blog, or digital services.

Comments can help you build a strong community for your website

By enabling comments, you can bring together like-minded people who can exchange ideas and thoughts on a specific topic. Your website could serve as a forum for these people, uniting them under mutual interests and shared points of view.

Comments improve your posts’ traffic and value

When visitors leave comments that are replied to, they are drawn back to the post to resume the conversation. As a result, your page views increase as visitors view your posts more than once, increasing your website’s value and traffic.

Comments allow you to receive feedback

Knowing how visitors perceive your content is essential to keep posting quality content. A quick browse through the comments on a post allows you to see your visitors’ opinions on the matter. You can use this knowledge to get ideas on how to improve your content in future posts.

Furthermore, in the comments section, you can create surveys asking your audience what else they would like to see on your website. Thus, the comments could serve you as a generator of new ideas allowing you to satisfy your audience’s interest for a long time.

Introduction to the Comments section

All comments are saved on your website, and you have full control over them as administrator. To begin with, you should log in to your WordPress dashboard. Select Comments from the menu on the left, where you can view and manage all comments.

The Comments section in a WordPress dashboard

By default, the section shows all comments. You can perform various actions on a comment by hovering the mouse over it, which launches an actions menu. The options depend on the comment’s status.

You can disapprove, edit, reply, mark as spam, or trash an approved comment.

For a pending comment, the options are to approve, edit, mark it as spam, or trash it.

Spam comments can be approved or trashed.

Comments in Trash can be marked as spam, restored, or permanently removed.

Furthermore, you can select multiple or all comments and perform bulk actions. Select the action from the drop-down menu Bulk actions, tick the boxes for the chosen comments and hit Apply.

Bulk actions you can perform on the comments

Comment Statuses

At the top of the Comments page, you can view and sort the comments by their status. A comment can be in one of the following statuses:

  • Pending – comments posted by your visitors awaiting your approval. They are not publicly visible and will be published once you approve them.
  • Approved – published comments that anyone can see.
  • Spam – comments considered malicious, unwanted, or suspicious. WordPress monitors automatically for spam comments, but you can manually mark comments as spam, as well. They are not published and will stay in the spam quarantine. You can approve or permanently delete them.
  • Trash – comments moved to the trash bin by authorized users. You can restore, permanently delete or leave them as they are. In 30 days, WordPress deletes trashed comments if no action is taken.

How to edit comments

In Comments, hover the mouse over the comment you wish to edit. From the actions menu, select either Edit or Quick Edit.

How to edit the comments

Edit loads the editor on a new page where you can change the comment’s text and status and the author’s name, email, and website. Confirm the changes with the button Update.

The comments' editor in WordPress

Quick edit loads the editor on the same page. You can change all parameters of a comment except for the status. Once ready with the changes, hit the Update Comment button.

Quick edit on comments

How to remove comments from WordPress

In the Comments section, you can also delete comments. To delete a comment, hover the mouse over it to call the actions menu and select Trash. WordPress will move the comment to the trash bin and will permanently delete it in 30 days.

How to remove a comment from WordPress

If you don’t want to wait for WordPress to delete the comment, open the Trash page in Comments. You will see the comment moved there. Hover over it and select Delete Permanently.

How to delete permanently a comment in WordPress

How to delete all comments in WordPress

You can also delete all comments at once from the Comments section. Tick the top left box next to Author, which marks all comments. Open the Bulk actions drop-down menu and select Move to Trash. Confirm the action with the button Apply.

How to delete all comments in WordPress

If you wish to delete the comments immediately, go to Trash, tick the box next to Author and select Delete Permanently from the Bulk actions drop-down menu.

How to delete permanently all comments in WordPress

How to control the Discussion settings?

The Discussion settings control the management of WordPress comments. You can access them from your website’s dashboard by navigating to Settings > Discussion.

The Discussion settings in WordPress

Notification settings

You have the option to receive notifications when another website posts a link to your website. You can also notify other websites when you post a link to them. This is possible through the use of trackbacks and pingbacks.

Trackbacks allow you to send notifications to other websites when you mention them in your blog post. The recipients can then choose to display the trackback as a comment on their website. This comment will display a title, link, and excerpt of the post.

Pingbacks work similarly to trackbacks. When you post a link to a website, your blog will send a pingback to it. This website will visit your blog to confirm the origin of the pingback and that the link is present. The recipient can then post the pingback as a comment. Unlike trackbacks, pingbacks don’t visualize an excerpt of a post. They are merely links to your blog.

You can manage these notification settings in the first section of Discussion Default post settings.

Notification settings in Discussion

By selecting Attempt to notify any blogs linked to from the post, your website will notify other websites whenever you post a link to them.

The option Allow link notifications from other blogs (pingbacks and trackbacks) on new posts enables trackbacks and pingbacks sent to you, notifying you when another website posts a link to your website.

Keep in mind that pingbacks and trackbacks can be exploited by spammers and flood your comments section with links to suspicious websites. That is why they are not such a popular feature nowadays, and most website owners choose to refrain from using them. We recommend carefully considering if you need them, as well.

How to turn off comments in WordPress for future posts and pages

The last option of Default post settings is Allow people to submit comments on new posts. It is ticked by default and allows visitors to comment on your post. By unticking its box, you will prevent anyone from commenting on your future posts. Keep in mind that existing comments remain. You can override this setting for individual posts by allowing or disallowing comments from the respective post’s settings page.

How to disable comments for future posts

How to define who can comment

The next section of Discussion is called Other comment settings. Here, you can set various rules for the comments, and the first few options control who can comment on your site. These options could help you prevent spam comments, as they usually come from unverified users and bots.

Who can comment on your website

“Comment author must fill out name and email” prevents visitors from leaving anonymous comments. They must fill in their name and email address before posting.

“Users must be registered and logged in to comment” allows only registered users of your website to leave comments.

Display options for comments

The remaining options of Other comment settings define how the comments appear on your website.

Display options for comments

“Automatically close comments on posts older than * days” hides comments on posts older than the specified number of days. By default, it is set to 14 days. This is a helpful feature if your posts are related to campaigns for a limited time, and it also helps prevent spam comments.

“Show comments cookies opt-in checkbox, allowing comment author cookies to be set” adds a checkbox under the comment box. This enables visitors’ browsers to save cookies storing the details they used in the comments on your posts. As a result, browsers auto-fill the details when users post future comments on your website. Below, you can see what the checkbox looks like.

How to enable cookies for comments

“Enable threaded (nested) comments * levels deep” enables nested comments, which means visitors can post direct replies to a comment. The replies are inlined below the original comment.

You can define how many levels of replies one comment can have (reply to a reply). By default, WordPress sets it at five levels.

“Break comments into Pages with * top level comments per Page and the first/last Page displayed by default” lets you adjust how your website shows the comments. You can set the number of comments appearing on a page and whether the oldest (first) or latest (last) comments are shown first.

It is recommended to break the comments into pages as it improves the website’s speed. If a post has a lot of comments, loading them all at once can take a lot of time.

“Comments should be displayed with the older/newer comments at the top of each page” allows you to choose whether the latest or oldest comments appear at the top of a page.

Email notifications for comments

From the section Email me whenever you can choose the events that trigger WordPress to notify you on your administrative email.

Email notifications for comments

Anyone posts a comment – by enabling this option, WordPress will notify you every time a new comment is submitted on your posts.

A comment is held for moderation – whenever a comment is awaiting approval, you’ll be notified so you can review it.

Be cautious if you choose to enable both options. Ill-intended visitors and malicious bots may target your website and post a high number of spam comments. Since you will be receiving a notification for each comment, your inbox could be flooded in no time.

Should you choose to receive email notifications, we recommend taking extra measures to protect your website from spam or allowing only registered users to post comments.

Administrative rules for comments

The section Before a comment appears enforces the actions that will be taken before a comment is approved.

Administrative rules before a comment appears

If you wish to review and approve each new comment manually before it appears on a post, tick the “Comment must be manually approved” box.

“Comment author must have a previously approved comment” allows automatic approval of comments only from trusted commenters whose posts you previously approved. It’s a good idea to enable this option if your posts get a lot of comments since the number of comments pending approval will be reduced.

How to stop spam comments in WordPress

Spam comments are extremely pervasive, but WordPress has several mechanisms to combat them. Comment Moderation and Disallowed Comment Keys allow you to create rules for handling comments matching certain criteria.

Comment moderation

In the Comment Moderation section, you can list words, author names, URLs, IP addresses, email addresses, and user agents you find suspicious.

If a comment contains a matching item from the list, it will be held in the Pending list of the Comments section. You will then have the chance to review it and determine whether you want to approve it or delete it.

Comment moderation in WordPress

You can also set the number of links a comment contains that you consider suspicious. If the comment hits the limit, it will be queued for moderation.

Disallowed Comment Keys

Disallowed Comment Keys is similar to Comment Moderation. The difference is that comments containing a match from this list will be directly placed in Trash.

Disallowed Comment Keys

Avatars

Avatar is a profile picture representing the user in forums and discussions. In the Avatars section, you can allow or forbid the use of avatars by checking or unchecking the box for Show Avatars.

From the menu Maximum Rating, you can select how graphic the avatars can be. Some visitors may take offense to certain images, so you must consider your general audience’s age and preferences.

If users don’t have personal avatars, you can also select a default image that will be displayed next to their names.

Comment Avatars

How to disable comments on a WordPress post/page

Your website enables comments by default. However, you may disable comments on specific pages or posts.

This is possible in WordPress, as each page or post has a separate Discussion setting. First, open the Pages or Posts section on your WordPress website.

To quickly change the comments settings of a page or post, hover over it and select Quick Edit. The settings screen expands on the same screen. Untick the box Allow Comments to disable comment. Tick the box to enable comments on a WordPress page or post if the comments were previously disabled.

Quick edit for a comment to disallow or allow comments

Alternatively, you can modify the setting from the WordPress editor. In Pages/Posts, select Edit for the corresponding page or post.

How to turn off comments by editing a page

On the editor page, click the Settings icon, select the Page section, and scroll down to Discussion. Check the box Allow comments to enable comments, or uncheck it if you wish to disable comments on this page/post.

How to enable or disable comments on a post or page in the WordPress editor

How to disable WordPress comments for multiple pages/posts

You don’t have to disable comments for pages and posts one by one. If you wish to disable or enable the comments for multiple pages/posts, go to your WordPress dashboard’s Pages/Posts section.

Check the boxes for the pages/posts for which you want to disable the comments. From the Bulk actions menu, select Edit and hit Apply.

How to disallow comments for multiple pages or posts

The page will expand a menu of options for the selected pages/posts. Click on the Comments drop-down menu and select Do not allow. Confirm the change with the button Update.

Disallow comments on multiple posts or pages with bulk editing

How to turn off and remove all WordPress comments

Comments are enabled by default. However, there are several methods to remove them entirely if they don’t add any value to your website.

Disable and remove comments manually

There are a few steps to follow to disable and remove the comments from your dashboard.

  • Step 1Disallow comments for future posts

    First, you want to ensure that any new post won’t allow comments. Go to your dashboard and select Settings > Discussion. In the section Default post settings, untick the box “Allow people to submit comments on new posts”.

    Disallow comments for future posts

  • Step 2Turn off comments for existing posts and pages

    The step above disables comments only for future posts. However, it doesn’t apply to the existing pages and posts. To disallow comments for them, go to the respective section for Pages or Posts.

    Check the box next to Title, which selects all posts or pages. From the Bulk actions menu, select Edit and press Apply.

    Turn off comments for all existing pages or posts

    WordPress loads the editing options on the same screen. From the drop-down menu Comments, select Do not allow. Confirm the setting with the Update button.

    Disable the comments for all posts or pages

  • Step 3Delete all WordPress comments

    From your WordPress dashboard, go to Comments. Tick the box next to Author to select all comments. From the drop-down Bulk actions, select Move to Trash and hit Apply. WordPress will delete all comments from all pages and posts.

    Delete all WordPress comments

Use a “disable comments” plugin

Apart from the manual approach, you can use a plugin. There are dozens of plugins dedicated to disabling and removing comments from WordPress websites. Some of them provide additional options for comment management, too.

One of them is Disable Comments for Any Post Types. For more information on its features and how to use it, visit the plugin’s page on the WordPress Plugins Repository.

Turn off comments from the theme’s functions.php file

There is one more method for disabling comments on a WordPress website, but it comes with a warning. It is recommended to advanced users as doing it incorrectly may break your website.

You can disable comments by modifying your theme’s functions.php file. Thus, before you proceed, make sure to create a backup of your website or the file. This way, you can revert the changes if the code is not added correctly and breaks your website. Find more information about the SiteGround Backup Tool here.

Once you’ve backed up your website, you can proceed with the following steps.

  • Step 1Find out which is your active theme

    If you are unsure which is your active theme, you can always find this out in your WordPress dashboard. Navigate to the Appearance section and click on Themes.

    On this page, you can see all installed themes, and the current one is marked as Active.

    Find out which is your active theme

  • Step 2Open the active theme’s functions.php file

    Now that you have established which is the theme, you must access your website files from FTP or a File Manager in your hosting panel.

    If you are a SiteGround user, log in to your website’s Site Tools from your Client Area > Websites. In Site Tools, navigate to Site > File Manager and open your website’s root folder, which is yourdomain.com/public_html, where yourdomain.com is replaced with your website name.

    You must open the theme folder, which is located at:

    yourdomain.com/public_html/wp-content/themes

    Access the active theme's folder

    Inside the theme folder, you will see the file named functions.php. Select it and hit Edit from the toolbar in File Manager.

    Open functions.php

  • Step 3Edit the functions.php file

    You will now see the file’s code in editor mode. Add the following lines at the bottom of the file:

    // Close comments on the front-end
    
    add_filter('comments_open', '__return_false', 20, 2);
    
    add_filter('pings_open', '__return_false', 20, 2);
    
    // Hide existing comments
    
    add_filter('comments_array', '__return_empty_array', 10, 2);

    Press the Save icon from the toolbox to confirm the changes.

    Edit the functions.php file

    That’s it! Now your website won’t show old comments nor allow visitors to leave new ones.

Summary

Comments are a great addition to your blog posts and pages, keeping your audience’s interest for a long time. They also help you understand how your visitors value your content.

WordPress accommodates this functionality for all your pages and posts and provides an extensive toolset for the comments’ management.

We hope this article helps you find the best way of handling the comments and building a strong community for your WordPress website.

Tutorial Menu

Share This Article