Recently my client’s WordPress site was flooded with fifteen thousand spam comments & posts. To protect the site, I advised the client to disable comments via
Settings > Discussion and un-checking
In WordPress, all comments are stored in wp_comments table. So my client supposed to delete all comments (I mean all records of wp_comments table, because all of them were spams).
Here are the steps to delete all records of a table in phpMyAdmin.
Option 1: Login to phpMyAdmin and click on the database on the left sidebar. Now phpMyAdmin will list all tables created in that particular database. To delete all records from wp_comments table, click on
Click OK in the alert box to delete all the comments.
Option 2: You can also run SQL query to delete all records from a table. To do that, select the table you wish to delete records and click
"SQL" tab. Delete the existing query in the query-box and click
"DELETE" button located at the bottom. You will see query-box inserted with DELETE query as ‘
DELETE FROM `wp_comments` WHERE 1'. Click
Go and you are done.
I love bugs and I love fixing them!