How to mass delete unapproved comments in Wordpress
opinion.tuxtraining.com is(was) a separate wordpress instance as it really does have little to do with this site and I wanted a degree of separation. I did not want user accounts at that site, nor did I wish to run ads. It’s more for my own amusement than anything and definitely has nothing to do with Linux tutorials and howtos.
Well I neglected it for far too long, it did not have akismet installed , and so when I logged in I had 2000+ spam comments waiting for me. Now I wasn’t about to delete 100 pages of comments manually one page at a t ime through the wordpress interface.
So this is what you do:
Log into your webhost and open up mysql, do a use <databasename> to switch to the appropriate database and issue the following command:
mysql> DELETE FROM wp_comments WHERE comment_approved = ‘0′;
Any comment that has not been approved will now be deleted.







