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

  • No, just wondering if he still wants it up there if he isn't using it anymore; it would just be one less blog you have to update.

    The other thing you could do is move them all into an Mu installation and then you'd only have to update one.
  • Dan
    Why? You want to buy it?
  • Have you asked him if he still wants it anymore?
  • nstryker
    nice example :-)
blog comments powered by Disqus