I noticed one of our Wordpress sites contained thousands of spam comments. These comments were all unapproved, so they were not published on the web site. Nevertheless, I decided to delete them.
It would take an hour to delete all of those comments with the Wordpress GUI front-end, so I went to MySQL for a quick fix.
SQL Command to Delete all Pending Comments In Wordpress:As per usual, be certain to back up your database before using MySQL commands directly.
SQL Command to Delete all Approved Comments in Wordpress:Code:delete from wp_comments WHERE comment_approved ="0";
SQL Command to Delete ALL Comments In Wordpress:Code:delete from wp_comments WHERE comment_approved ="1";
Code:delete from wp_comments;