How to Delete All Comments on WordPress Manually, Using a Plugin, and More
Having comments on a website is a great way to engage your audience. Unfortunately, it’s also one of the many platforms that hackers can use to fill your site with spam and malicious content. This article will show how to delete all comments on WordPress.
We will go over why deleting comments may be necessary, as well as three different methods to remove all comments on your WordPress website.
Reasons to Delete Comments
Although comments can help build relationships with the audience, there are times when you need to remove them from your WordPress site. An example is when you need to get rid of spam messages, which is common among websites without an anti-spam setup.
These comments can harm user experience and WordPress search engine optimization (SEO) rankings. Furthermore, they can pose security threats as they may contain malicious content or direct visitors to an unsecured website.
How to Delete All Comments On WordPress
The following sections will list three ways to remove all comments on your WordPress site – from the easiest to the most difficult. Which method you choose depends on your preferences and technical knowledge.
Use the WordPress Admin Dashboard
The most straightforward way to delete all comments on WordPress is to log in to your admin dashboard and navigate to the Comments page. Follow these steps:
- Select Comments on the left menu.
- Find the Bulk Actions dropdown menu and choose Move to Trash. Select all comments and click Apply.
Use a WordPress Plugin
Another option is to install a WordPress plugin specifically for removing multiple WordPress comments simultaneously. WP Bulk Delete is a great option for this, as it can implement filters and conditions when managing comments based on your needs.
The free version of the plugin comes with a primary comment remover feature. For more filter options, check out the Pro plan for $29/site.
Follow these steps to remove all comments with WP Bulk Delete:
- Head to the WordPress admin dashboard and navigate to WP Bulk Delete -> Delete Comments.
- Check the filters you want to use and click Delete Comments. The free version lets you filter comments based on their status and publication date.
Use phpMyAdmin
Finally, you can delete all WordPress comments directly from your database using phpMyAdmin. Consider this method if the admin panel or plugin method isn’t working properly. That being said, it requires some basic knowledge of databases and SQL.
There are two options to delete comments using phpMyAdmin – running an SQL query or emptying the comment table. Both methods will modify two tables where comments take place, wp_comments and wp_commentmeta.
Important! The tables’ names might differ depending on your database prefix.
Your database is accessible from your web hosting control panel.
The tutorial below will show you how to delete all WordPress comments using an SQL query from Hostinger’s hPanel. This method is suitable if you have specific types of comments to remove.
1. From your hPanel, head to Databases → phpMyAdmin and choose the database you want to modify. Click Enter phpMyAdmin.
2. In phpMyAdmin, select the wp_comments table.
3. Click on the SQL tab at the top to open the SQL query window.
4. Choose one of the following queries to delete comments based on particular conditions:
Delete all WordPress non-approved and pending comments:
DELETE from wp_comments WHERE comment_approved = '0'
Delete all WordPress approved comments:
DELETE from wp_comments WHERE comment_approved = '1'
Delete all WordPress trash comments:
DELETE from wp_comments WHERE comment_approved = 'trash'
Delete all WordPress spam comments:
DELETE from wp_comments WHERE comment_approved = 'spam'
5. Add the chosen query to the SQL query window, then click Go. Repeat this step several times according to the number of queries you want to execute.
6. Repeat the entire steps to remove comments from the wp_commentmeta table.
If you want to delete all WordPress comments unconditionally, you can follow these steps:
- In phpMyAdmin, tick wp_comments and wp_commentmeta’s respective boxes to the left.
- Find the With selected dropdown menu and select Empty.
- Click Yes to confirm that you want to execute the presented queries.
Conclusion
Comments play an essential role in growing your audience, but some situations may deem it necessary to purge them. Some comments can harm your site’s SEO and user experience.
Therefore, this article has shown how to delete all comments on WordPress:
- Using the WordPress admin dashboard. The most straightforward option. However, there’s no ability to filter the comments.
- Using the WP Bulk Delete plugin. The simplest and most flexible option as it offers the option to filter the comments.
- Using SQL queries in phpMyAdmin. This method requires technical knowledge but offers more control over the deletion process.
As each method has its pros and cons, it’s best to consider your needs before deciding. We recommend doing a test run on a couple of WordPress comments first to see which method best suits your preferences.
Learn What Else You Can Do With WordPress
How to Duplicate Pages and Posts on WordPress
How to Undo Changes in WordPress
How to Delete WordPress
WordPress Taxonomy Guide
Guide to WordPress Revisions
Comments
March 19 2018
Hello Merkys, you have described great ways to remove the unwanted comments from the WordPress blog or website. I, however, believe that it is good to remove the plugin from WordPress default admin section. It's really easy. Removing comments through the PHPMyAdmin is the best way but it needs some technical knowledge of MySQL. While removing the comments with the help of plugin can decrease your website speed as it needed you to install another specific plugin for a small task which can be managed from WordPress admin dashboard.
January 17 2019
Thank you! I did this using the SQL query method and worked like a charm!
March 10 2020
Delete All Comments Easily With this WordPress plugin you can delete all comments from a WordPress installation very easily. However, the comments can only be restored from a backup.
May 02 2021
Thank you for this blog..the wp bulk delete is perfect if you have 10k pending blog comments that are spam stuff...wow life saving
May 06 2021
Hi Mike! Great to hear it. It really is a time saver!
October 19 2023
thanks for the post, the plugin is perfect to use, it deleted my 17k comments in 1 minute.
October 27 2023
You're welcome! It's great to hear that the plugin worked so efficiently for you ?
October 28 2023
awsome method with plugin time saving method thank you
November 07 2023
Hi Aaqib! You're welcome! I'm glad you found the method helpful ?
November 03 2023
great article
November 08 2023
Hi there! We're glad you enjoyed the article. If you have any more questions or if there's anything else we can assist you with, feel free to let us know ?
December 15 2023
Excellent understandings, thanks for sharing this!
December 19 2023
You're very welcome! If you have any more questions or if there's anything specific you'd like to know more about, feel free to ask. We're here to help ?