promethea
Member
Posted 2 years ago #
I have over 1,600 comments that are spam on my site. I have just installed Akismet, so I think that should solve the problem of future spam, but how do I get rid of the 1,600 comments? It seems I can only delete 20 at a time, which means I will have to do it 80 times. Is there anyway to delete the whole 1,600 at one time?
Please, please tell me there is!
Backup your database first. See WordPress Backups.
The can use phpMyAdmin to execute this SQL
DELETE FROM wp_comments WHERE comment_approved = 0
Of course if your comments table is prefixed with wp_ you will need to use the correct table name.
Screen options > Comments per page ...
And, one more visual (video) guide:
[link moderated]
In Screen Options you can set the screen to show much more than 20 comments at a time.
Or, you can run this in PHPMyAdmin:
delete from wp_comments where comment_approved = ’spam’;
but backup your database before doing so, etc.
arabsteps
Member
Posted 2 years ago #
Thank u Very Much For The Explaining
thecolourmill
Member
Posted 1 year ago #
Thanks, this worked for me too. I was re-building an old blog with over 30,000 spam comments(!) and Askimet kept timing out, but the method above (via phpmyadmin) worked within seconds.