I have a "bad case of the Monday's". Not easy to get back into the groove after 4 days off. 1 hr ago

Home / blog / WordPress Maintenance ~ Delete Comment Spam

I host a lot of wordpress sites for friends, family and business and one thing I’ve noticed is the collection of spam on some of these sites because they either don’t want to use the provided spam plugins, don’t maintain the plugins or just simply don’t care about their blog anymore.

Something I do regularly on my site but neglected to run on the other sites is running a SQL to delete the comments marked as spam in the comments table.

Instructions:

Open up PHPMyAdmin. After selecting your DB on the left click “SQL”,

dancameronorg-_-localhost-_-jaredw-phpmyadmin-2110-2.jpg

The SQL to enter should be,

DELETE FROM `wp_comments` WHERE `comment_approved` = ’spam’

If you’re like me I and changed the default table prefix (highlighted above) from wp_  just change the SQL with the correct prefix for your table.

Then click “GO”.

After you’ll be greeted with this informational dialog. 43K comments is ridiculous and will slow down your db.

dancameronorg-_-localhost-_-jaredw-phpmyadmin-2110.jpg

You’re not done yet, click structure and optimize your tables to get rid of the overhead.

dancameronorg-_-localhost-_-jaredw-phpmyadmin-2110-1.jpg

Viewing 4 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus