How to delete bulk pending comments in wordpress using phpMyAdmin

If you found this post helpful, kindly share it and show your support :)

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.
  1. Log into phpMyAdmin
  2. Click on the database related to your site
  3. Select table wp_comments. The name of the comments table may differ depending on the table prefix that you choose during WordPress installation.
  4. 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
  1. Log into phpMyAdmin
  2. Click on the database related to your site
  3. Click on the SQL tab
  4. 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 🙂

Loading

Mohammed Noufal

I'm Mohammed Noufal, working as Server Admin for the last 10 years.  In my day-to-day life, l had to face different problems related to Web-hosting. On my website Errorlogz.com, you can find solutions for different Web-hosting-related problems. Sometimes, I spent hours searching/googling to find a solution. This inspired me to start a website that gives solutions to different Webhosting problems. This website includes basic Linux and windows commands, and different control panels like cPanel, Plesk, DirectAdmin, Webmin & so on. You can find solutions and or suggestions for different Web-hosting related problems from here. Hence I would like to say Errorlogz is your server protector.  I will be glad if Logdetect can help any one of the Server admins to find a solution to his problem.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *