How to Delete Mass Spam Comments from WordPress Site


Spam Comments
Spam Comments

Are you facing problem with spam comments in your Word Press Blog?

In the Following Simple Solution I will show you how to Mass Delete WordPress Comments directly from the WordPress database. If you have hundreds of pending WordPress comments that are mainly spam comments, it can take forever to delete them manually via the WordPress dashboard. By using the following process to delete WordPress Comments, you can achieve this goal in a matter of seconds.

Delete all comments from your Word Press Database using phpMyAdmin:

* Go to phpmyadmin in your cpanel

This is the management panel that comes with your hosting account if it uses the Apache environment. Once you’re logged in cpanel click on the mySQL databases icon then click on the phpmyadmin link at the bottom of the page.

* Click your Word Press database link

This is located in the top left and will display all the data in tables.

* Remove all comments

If you want to remove all comments check the wp_comments table then in the drop down box select empty then press go. Remember this will remove both approved and unapproved comments.

Delete unapproved comments and keep the approved comments:

* Back up your database – this is to make sure you can restore all your files should you make a mistake. To do this click on your database, click export, make sure all your tables are selected, check SQL, click save file, click go. Follow the rest of the screen prompts to download the database to your computer. You can save it as a text or zipped file.
* Click on the comments table. ( You can click browse to view all the approved and unapproved comments).
* Click the mySQL tab. This will open up a query box. Delete the default query and type in:

DELETE FROM wp_comments WHERE comment_approved = ‘0’

Click go

This will delete all the 000s of unapproved comments, all at once.

* Remove overhead: These are fragments still left in the database that must be removed. To delete them go to ” check all tables with overhead”, select “optimize table” from the drop down box.

Your database size will now be reduced because you’ve removed the 000s of unapproved comments.

If you check your blog you’ll notice all the comments have disappeared.

To prevent spam from accumulating install and activate the Akismet plugin. This is a spam filter which allows you to mass delete comments within the Word Press administration panel.

Related Posts Plugin for WordPress, Blogger...