WordpressIntegration.com > Blogging > Get rid of comments in your WordPress site: Some tips and hacks

Get rid of comments in your WordPress site: Some tips and hacks

April 14th, 2020

As developers of WordPress in a challenging online market, we are constantly asked by our clients for an easy way to moderate comments. WordPress, being a highly user friendly content management system, has an option to individually unapprove, edit, or delete a comment. But consider this; nearly every popular or moderately popular WordPress site is bombarded with hundreds of spam comments all day. Nearly all of them use spam filters but even then tons of unapproved or wrongly approved comments per day are accumulated, and God forbid if you leave your site for a month or so, you will have a collection of hundreds of comments waiting for approval.

If you go about deleting every single comment individually you won’t have the time left for anything else. Therefore to alleviate this problem, here we present few tricks using which you can bulk moderate comments.

Delete comments using plugins

There are a number of ways through which you can delete comments. Out of them the safest way is to use plugins. There are a number of plugins that can be used to moderate comments, each having its own advantages and disadvantages. Here we present a few plugins that can get the job done for you.

WP Ajax Edit Comments

WP Ajax Edit Comments

This plugin is used for allowing users to edit their comments for a short period of time. However it is a complete comment management solution that can be used to mass delete approved, unapproved, or spam comments. The plugin also has the feature to move the comments or blacklist it. This plugin is great for those who have some time to analyze the comments.

Requires: WordPress 3.1 or higher|
Compatible up to: WordPress 3.5.1|
Downloads: 249,076

Delete Pending Comments

Delete Pending Comments

This plugin can delete all the pending unapproved comments. This plugin is a great option for those who face hundreds of spam comments monthly or daily. However it cannot identify legitimate comment from spam or irrelevant comments; to do that you have to personally check all the comments.

Requires: WordPress 2.7 or higher|
Compatible up to: WordPress 3.0.5|
Downloads: 26,871

Bulk Comment Remove

Bulk Comment Remove

As the name suggests, Bulk Comment Remove can eliminate pending comments in mass. However, just like the previous plugin it won’t delete the approved comments, neither can it identify relevant comments from spam ones.

Requires: WordPress 3 or higher|
Compatible up to: WordPress 3.0.5|
Downloads: 19,628

WPCommentCleaner

WPCommentCleaner

WP Comment Cleaner can delete pending comments in bulk. But unlike the previously discussed plugins, it can delete approved, unapproved, and spam comments as well. It can’t differentiae spam from genuine comments. Also this plugin is not tested for WordPress 3.5.1 or higher so it may break when used in them.

Requires: WordPress 2.8 or higher|
Compatible up to: WordPress 3.4.2|
Downloads: 2,620

Delete comments from WordPress dashboard

The main reason why WordPress is extremely popular is because it’s highly user friendly. Being user friendly means it has native features to manage every aspect of functionality easily. Therefore just like every feature of WordPress, comments are also highly customizable. You can easily delete approved, unapproved, and spam comments right from the WordPress dashboard, that too in bulk. Just follow these few simple steps

  • Login to your WordPress dashboard
  • From the left panel go to comments tab
  • Now in the top right side of the screen, just below your login name in admin bar you will see a tab named Screen options. Click it
  • Now in the Show on Screen panel you may enter the number of comments to show on the screen page. The maximum possible option is 999, so let’s set it at 999.
  • Now filter the comments according to your need in the comment page. You can filter approved, unapproved, spam, trash, or all comments. Now, let’s assume you have to delete all unapproved comments. So, just click on unapproved and you will get a list of all unapproved comments.
  • Now click on the top check box that is right beside the Author. This will select the check boxes of all the filtered comments.
  • Now on the bulk actions drop down, select move to trash.
  • Click on Apply.
  • Now go to Trash option, then in select all the comments as told above. In the bulk action dropdown select Delete Permanently option and then click Apply. You have just deleted all the unapproved comments permanently.

With a few simple steps you have deleted 999 unapproved comments. If you have more than 999 comments just follow this step as many times as required. But be aware, there‘s no way to filter genuine and legitimate comments from spam ones (those that have evaded spam filter plugins) unless checked manually. This method will delete every unapproved comment, so you may have to sacrifice the genuine ones also.

Delete comments through PhpMyAdmin

The above mentioned ways are sufficient for tackling any comment related problem but for the sake of completion I am providing you with one more way to delete comments. This is through directly accessing the PhpMyAdmin panel of the WordPress database. This method is for professionals and the curious ones only. Tampering with WordPress database may have unexpected repercussions so try this at your own risk. With that said lets first take a backup of your WordPress database.

  • Go to PhpMyAdmin panel and click on the database in which you have made your WordPress site.
  • Click on Export tab. Select all the database tables and save the database as SQL file. You can save it any way you like but we prefer SQL files as it’s easier to upload back.
  • Now with the backup done go to the PhpMyAdmin home
  • Click on the SQL tab.
  • Run the following command
  • DELETE FROM wp_comments WHERE comment_approved = ‘0’
  • This will delete all the unapproved comments. For deleting approved comments replace ‘0’ with ‘1’. Similarly replace ‘0’ with ‘spam’ or ‘trash’ for deleting spam and trash comments respectively

This will instantly erase all your selected comments as usual. It does not filter real comments from spam ones. If you have done something which you do not desire, simply Import the previously backed up data.

How to turn off comments permanently in your WordPress website

Every WordPress developer and search engine optimization company, understands the importance of comments for improving the search engine ranking of any WordPress blog. But blogs are not the only type of websites that can be built using WordPress and comments are not necessary for every page or site. If your website is made in such a way that you don’t even need the comments then too there are options available in WordPress.

Disabling comments from Dashboard

As we know, WordPress is highly customizable. It was made keeping in mind that it will be used for making different types of sites. Therefore, it has many inbuilt features that can be utilized to customize your comment. Disabling comments on your posts and pages is thus not that difficult. Simply follow the steps below:-

  • Go to the specific page or post in which you want to disable comments
  • Click on the Screen Option tab in the top right corner of the screen and then check on the Discussion check-box
  • You will now have a discussion panel in the bottom of the screen. Uncheck the Allow Comments option.
  • This will disable the comments of that particular post or page, but will not remove the comments that have already been posted.
  • If you want to disable comments in all the present and future posts and pages, go to Settings->Discussion and in the Default article settings uncheck Allow people to post comments on new articles. This will permanently disable comments from you posts.

Plugin to disable comments

Of course there are plugins available to do this job for you. These are customizable and easy to use. The most relevant and the most famous plugins are:-

Disable Comments

Disable Comments

The main use of this plugin is to disable global comments from a certain post type such as post, attachment, page, etc. This is not possible from WordPress inbuilt features. In addition if you have multiple websites on a single WordPress installation, this plugin can be used to disable comments on the entire network.

Requires: 3.2 or higher|
Compatible up to: 3.5.1|
Last Updated: 2013-2-21|
Downloads: 199,463

Do not display “comments are closed” tag

We have some clients who want their WordPress pages to have only few selected comments from established users and do not want any additional comments from any other source. This customization is possible from dashboard but it has a small but undesirable effect. At the end of post you will see a tag saying “Comments are Closed”. For aesthetic reasons most do not like this tag. Removing this tag is a little technical but not that difficult. Just follow these simple steps:-

  • Go to Appearance-> Editor
  • Open comment.php
  • Find the following lines
  • if ( ! comments_open() && get_comments_number() ) : ?>
    <p><?php _e( ‘Comments are closed’ , ‘twentyeleven’ ); ?></p>
    <?php endif; ?>

  • Change it to
  • if ( ! comments_open() && get_comments_number() ) : ?>
    <p><?php _e( ” , ‘twentyeleven’ ); ?></p>
    <?php endif; ?>

  • Yes, we have just changed the ‘Comments are closed’ to simply nothing or can be used to display any message you like.
  • Click on update and say goodbye to the Comments are closed tag

As demonstrated it’s a simple step and won’t effect any other program, plugin, theme, or widget. Disabling comments may be required in some specific pages, like About Us page, but they are really important for blogs and discussion pages. They promote mutual interactions, increase the authority of your blog, encourage visitors to visit regularly on a page that they have already read, and most importantly critical and informative comments by experts not just increases your overall knowledge but of your future visitors. So don’t jump the gun for disabling the comments. Analyze and consult first.

Conclusion

Removing comments is not a very difficult task but unfortunately removing spammy comments from genuine comments is a very difficult job. There are plugins that can filter spam comments but the human ingenuity to spam tops all and you get unrequired comments no matter which plugin you use. But still they are a great help.

Certifications &
Partners
Certifications