How to delete bulk pending comments in wordpress using phpMyAdmin
If you find thousands of spam or pending comments in your WordPress admin dashboard, do not be panic because there are easy ways to quickly delete those spam comments. If the spam comments keeps coming in, you will need to configure your website with Google reCAPTCHA or any other method to control spam comments.
- To delete bulk comments in phpMyAdmin, you can follow below steps.
- Log into phpMyAdmin
- Click on the database related to your site
- Select table wp_comments. The name of the comments table may differ depending on the table prefix that you choose during WordPress installation.
- If you want to delete all comments, you just need to select wp_comments table >> click on the “‘With selected:” >> Select “Empty” under “Delete data or table” from the drop-down menu >> Click the Yes button to continue. All the comments under your WordPress database will be deleted now.
- To delete all approved comments in wordpress via SQL
- Log into phpMyAdmin
- Click on the database related to your site
- Click on the SQL tab
- Run the following command
DELETE from wp_comments WHERE comment_approved = '1'
5. Now, you will get a pop up box asking for confirmation – Click “OK” to confirm
- To delete all unapproved comments, run
DELETE from wp_comments WHERE comment_approved = '0'
- To delete all pending comments, run
DELETE from wp_comments WHERE comment_approved = '0'
- To delete all trash comments, run
DELETE from wp_comments WHERE comment_approved = 'trash'
- To delete all spam comments, run
DELETE from wp_comments WHERE comment_approved = 'spam'
That’s it 🙂