Clean Up WordPress comment spam

In this article we’ll explain how you can clean up and remove spam comments from your WordPress database directly using phpMyAdmin.

This is a bit more advanced than simply managing your comments in WordPress directly.

A major benefit of doing it this way, is if you’re dealing with a large amount of spam comments mixed in with legitimate comments in the WordPress database.

  1. First you’ll need to get to your WordPress database via the phpMyAdmin interface
  2. Navigate to your wp_comments table, and click Browsewp-comments-browse
  3.  
  4. These are the common WordPress comment rows you’ll work with:comment_post_ID
    comment_author
    comment_author_email
    comment_author_url
    comment_author_IP
    comment_content
  5. Click on the comment_post_ID column to sort by that column.

    Sorting by comment_post_ID is a quick way to see if just one of your posts is being comment spammed, as you’ll see all of the comments for that post one after another. In this example we can see our post ID #32 is filled with various “payday” spam users.

    wp-comments-sort-comment-post-id

    wp-comments-payday-author

  6. Now you can delete comments a few ways
  7. Single entry removal

    Click on Delete beside the comment you want to remove, then click OK in the pop-up:

    wp-comments-delete-single-entry

    wp-comments-delete-single-entry-ok

     

    Multiple entry removal via checkboxes

    You can click on the checkboxes beside each entry you wish to remove, scroll to the bottom of the page and click on Delete, and finally click on Yes on the next page to confirm the deletion.

    wp-comments-delete-multi-checkbox

    wp-comments-delete-multi-delete-button

    wp-comments-delete-multi-delete-confirm

     

    Either of these options should help you quickly clear up small spam outbreak.

When you have a more extensive spam outbreak, there are more advanced methods for cleaning these up. Please take a look at these other options below as well:

IC
InMotion Hosting Contributor

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Comments

It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!