How to mass delete comments in WordPress

How many times have you been through the boring task of deleting hundreds of spam comments in your unapproved/pending comments list in WordPress? It is very common to find a huge number of spams in comments section if you ignore a website for a while (maybe, you went on a vacation). Then there are websites attract spams rather than real comments. You can use WPCommentCleaner plugin to quickly delete unapproved comments, spams or approved comments in one click.

If you don’t want to use the plug-in, you can do so using phpMyAdmin. Run the following SQL command.

DELETE FROM wp_comments WHERE comment_approved = "spam";

Or

DELETE FROM wp_comments WHERE comment_approved = "0";

Or

DELETE FROM wp_comments WHERE comment_type = "spam";

PS: Please back-up your database before running the queries.