InMotion Hosting Support Center

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
  4. These are the common WordPress comment rows you'll work with:

  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.
  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:


    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.


    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:

Was this article helpful?
Continued Education in Course WordPress
You are viewing Section 42: 320: WordPress comment spam clean up
Section 41: 318: Adding a Form using Contact Form 7 in WordPress
Section 43: 321: WordPress advanced comment spam clean up with search

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

Support Center Login

Our Login page has moved. Please click the button below to be redirected to the login page.

Post a Comment

Email Address:
Phone Number:

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?


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:
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!