In wordpress When You get a Comments, they can be of these three categories.
Spam comments : If you have the very handy Akismet in place, commented identified as spam will go direct to spam comments.
Approved comments : WordPress has detected that these comments are real comments, and has immediately approved these comments
Pending comments : These comments pass the spam filter, but either WordPress feels they they are some sorta %u201Cnon human%u201D, or it violates some of the rules you have laid in the blog discussion settings.
If your blog have a Good Traffic, you can expect to receive a lot of spam comments. These are easy to clear. All you have to do is to click on Comments -> Spam from your WordPress admin page, and you can clear them in one go, with the %u201CDelete all Spam%u201D button.
The issue comes when hundreds, or thousands of comments come in and they go into your moderation queue.
The WordPress allows you to mass delete these comments in the wp-admin, but only in batches of 20 at a time. When you have 1000 comments waiting for %u201Cmoderation%u201D, well, you will start to realise batch deleting in 30s might not be a good idea.
we Gona use The CPanel, Depending again on your hosting provider%u2019s settings, the well-known way to access your CPanel is <yourdomain.com>/cpanel.
You will have to key in a username and password.
When you have successfully logged in, you will see a screen like this:
Nox look for the phpMyAdmin icon (under databases) and click on it. You should see a page like that when you are in the phpMyAdmin page.
Now Select your WordPress database by clicking on it on the left. You will see a list of tables within that database.
Then Next, locate the tabs on the right side, and find %u201CSQL%u201D. Click on that.
And You will see this screen.
Run the Following SQL command on your database The command is this:
Note: Make sure you are fully comfortable with playing around with the database. If not back it up first, before you run any commands. Else, get a professional to help you with it.
DELETE FROM wp_comments WHERE comment_approved = '0'
You should see a status message saying something like %u201C853 rows affected%u201D.
Then, you are done! Log back in to your WordPress admin panel, and you will find all the pending comments gone ;)