In the event an extraordinary amount of WordPress comment spam is received, comments can be quickly deleted by using MySQL or phpMyAdmin.

First, login to your cPanel dashboard. Under the database section, click on phpMyAdmin.

Next, locate your WordPress database inside phpMyAdmin. You should see a page like this showing all your WordPress database tables.

Find and check the box next to wpprefix_comments and wpprefix_commentmetatable. Note: the name of your comments tables may differ depending on the table prefix you choose during your WordPress installation.

Once the comments table is selected, locate the ‘With selected:’ drop down menu below the table list and select ‘Empty’ from the drop down menu.

PhpMyAdmin will display the following warning:

Click on the Yes button to continue. This will delete all WordPress comments from your database.

You can also delete all WordPress comments using MySQL console (command line). Simply log into your MySQL console and run this command:

1
2
TRUNCATE `wp_commentmeta`;
TRUNCATE `wp_comments`;