FileMaker,  Unix

Delete All WordPress Comments

WordPress uses MySQL as a back-end. I’ve seen a number of scenarios where someone was comment spammed. The comments weren’t approved and so never appeared on the site, but they were starting to fill up the MySQL database given that there were about 40,000 in one case and about 55,000 in another. In order to trash them you can use the following query from mysqladmin (once connected to the database of course):

DELETE FROM wp_comments WHERE comment_approved = ‘0’