---
title: "Clean Up WordPress comment spam"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/wordpress/wordpress-comment-spam/
date: 2012-10-10
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["WordPress Hosting", "WordPress Tutorials"]
type: post
lang: en
---

# 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](/support/) 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](/support/)
2. Navigate to your **wp_comments** table, and click **Browse**[![wp-comments-browse](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-browse.PNG)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-browse.PNG)
3. 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
4. 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](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-sort-comment-post-id.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-sort-comment-post-id.png) [![wp-comments-payday-author](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-payday-author.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-payday-author.png)
5. Now you can delete comments a few ways

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:

- [321: WordPress advanced comment spam clean up with search](/support/email/wordpress-comment-spam-search/)
- [322: WordPress advanced comment spam clean up with query](/support/email/wordpress-comment-spam-query/)
