Do you know when you have a bunch of outstanding comments and even spams comments on your WordPress site? Today you will learn how to get rid of them using a few simple steps.
WordPress comment spam is becoming a problem for all webmasters. If you do not have any spam protection settings on your WordPres blog, one day you may come across thousands of spam or pending comments within your site.
This tutorial will teach you how to remove WordPress comments from your site. The process is to explain how to easily delete all unnecessary comments from your site without going to work.
Content
What will you need
- Access to the WordPress admin area;
- Access to phpMyAdmin.
Option 1 – Remove WordPress comments by phpMyAdmin
Log in to your hosting control panel and go to phpMyAdmin . Within phpMyAdmin, select your WordPress database and click the SQL tab to run a query.
IMPORTANT : To avoid undesired data loss, it is strongly recommended to create a backup of the MySQL database before running any queries.
Depending on what you want to do, you will need to run the queries below to remove WordPress comments. Pay attention to the codes.
Remove any pending comments in WordPress:
DELETE from wp_comments WHERE comment_approved = '0'
Remove all spam comments in WordPress:
DELETE from wp_comments WHERE comment_approved = 'spam'
Remove all approved comments in WordPress:
DELETE from wp_comments WHERE comment_approved = '1'
Remove all comments from the Recycle Bin in WordPress:
DELETE from wp_comments WHERE comment_approved = 'trash'
Note that depending on your WordPress configuration, the prefix of the wp_ comments table may be different.
Just copy and paste the query you want to run on the SQL tab and press the ” Go ” button .
Option 2 – Remove WordPres comments that are spam by the CMS control panel
A second alternative to removing WordPress comments is by using the CMS control panel itself .
Log in to your WordPress control panel and navigate to the Comments > Spam section . You will see the Empty Spam List button . By clicking on it, all comments on your WordPress will be marked as SPAM.
Option 3 – Remove outstanding WordPress comments using a plugin
The third way to remove WordPress comments is by using the Delete Pending Comment plugin . It means “Delete Pending Comments,” which serves exactly the purpose of this tutorial.
You can easily install this plugin by navigating to the WordPress control panel. Click the Plugins section . Inside it, go to the search field and look for the Delete Pending Comments plugin . Install it.
Once the plugin installation is complete, go to the Comments section > Delete Pending Comments . Copy and paste the security phrase into the text field and press the Delete Pending Comments button .
Conclusion
Congratulations! You have learned how to remove WordPress comments in three different ways in this guide.
With any of them, you are able to remove unwanted WordPress comments, such as those automatic comments and even spam.
It’s a way to keep your site clean and free of those messages that, most of the time, do not add to the content of your page. Nor do they serve to hold a healthy discussion with the other readers.