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-idwp-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-entrywp-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-checkboxwp-comments-delete-multi-delete-buttonwp-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:

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!