This article illustrates how to delete WordPress bulk comments using phpMyAdmin.
Using this method, you can remove WordPress comments from your database in bulk.
Regardless, this approach necessitates database and SQL knowledge, therefore it is best left to those with experience in IT.
There are two ways in which phpMyAdmin can remove comments:
- Running an SQL query
- Emptying the comment table
You will alter the two tables, “wp_comments” and “wp_commentmeta,” where comments are typically found in both of the aforementioned options.
(Those names might have prefixes added to them in some databases.)
For example, “my_website_wp_comments”
Executing a SQL query:
Execute the subsequent inquiries in accordance with your needs. (Replace the “wp_ prefix” used in the following queries with your own if your database prefix differs from the usual one, “wp_.”)
- To eliminate NON-APPROVED or ALL PENDING COMMENTS
1DELETE from wp_comments WHERE comment_approved = '0'
- To eliminate ALL APPROVED COMMENTS
1DELETE from wp_comments WHERE comment_approved = '1'
- To totally eliminate ALL TRASH COMMENTS
1DELETE from wp_comments WHERE comment_approved = 'trash'
- To eliminate ALL SPAM COMMENTS
1DELETE from wp_comments WHERE comment_approved = 'spam'
Take note that the WP Bulk Delete plugin performs the same function behind the scenes. These are all irreversible actions.
Using phpMyAdmin:
You can use this way to remove all comments in one go, without any restrictions.
- Launch cPanel on your hosting.
- Access “Database Tools”. Choose “phpMyAdmin.”
- Decide which database you wish to edit. Navigate downward. Choose the “wp_commentmeta” and “wp_comments” options.
- Right-click on the “wp_comments” table, choose Empty, then press Yes to remove every comment. Selecting “enable foreign key checks” is not a crucial decision.
In this manner, you can delete WordPress bulk comments using phpMyAdmin. If you liked our article, you will surely love our support.