---
title: "WordPress advanced comment spam clean up with search"
description: "In this article we'll discuss a method for cleaning up spam comments from your WordPress database using phpMyAdmin. If you followed along with our previous 320: WordPress comment spam clean up..."
url: https://www.inmotionhosting.com/support/edu/wordpress/wordpress-comment-spam-search/
date: 2012-10-15
modified: 2022-02-23
author: "InMotion Hosting Contributor"
categories: ["WordPress Tutorials"]
type: post
lang: en
---

# WordPress advanced comment spam clean up with search

In this article we’ll discuss a method for cleaning up spam comments from your WordPress database using phpMyAdmin.

If you followed along with our previous [320: WordPress comment spam clean up](/support/edu/wordpress/wordpress-comment-spam/) article this would be one of the more advanced methods mentioned in that article.

Our next article in this series [322: WordPress advanced comment spam clean up with query](/support/email/wordpress-comment-spam-query/) is an even more advanced method to help remove comment spam from your database.

## Multiple entry removal via search

In our previous example from the first comment spam clean up article we noticed that a lot of the **comment_author** spam had the word ***“payday”*** in it with variations. You can utilize the **Search** functionality of phpMyAdmin to help in the process of finding all of these entries and quickly removing them.

1. First you’ll need to [get to your WordPress database via the phpMyAdmin interface](/support/)
2. Click on the **Search** tab at the top[![wp-comments-search-tab](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-tab.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-tab.png)
3. In the first field **Word(s) or value(s) to search for:** type **%payday%**.The reason you place a **%** symbol at the beginning and end of the wordis because that means a wildcard character (any character at all).This way we’ll find entries for **loan payday** as well as **payday loans**. Leave the **Find:** option as the default of **at least one of the words**. In the **Inside table(s):** menu click on **wp_comments** to only search within that table Next to the **Inside column:** field enter in **comment_author**, then finally click **Go**[![wp-comments-search-values](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-values.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-values.png)
4. Click on **Browse** to see the results of your search [![wp-comments-search-browse](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-browse.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-browse.png)
5. You’ll notice we have **103** matches for our search, but we’re only seeing rows **0-29**, because of the default entry beside **Show:** of only **30[![wp-comments-search-display-default-30](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-display-default-30.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-display-default-30.png) ** You can either go through one page at a time with 30 items per page, or if you prefer you can increase the limit beside **Show:** up to **103** to show all of our search results at once. You’ll want to also change the **starting from row # **option to **0** to begin at the first result, then click on **Show:**[![wp-comments-search-display-default-103](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-display-default-103.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-display-default-103.png)
6. Now in this case because we’re looking at just the **comment_author** field, it’s very unlikely a legitimate comment user is going to use the word **“payday”** anywhere in their name. So scroll to the very bottom of the page and click on **Check All[![wp-comments-search-check-all](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-check-all.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-check-all.png) **
7. Now that all entries have been checked, click on the **Delete** icon at the bottom[![wp-comments-search-check-all-delete](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-check-all-delete.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-check-all-delete.png)
8. Now scroll to the bottom of all the DELETE confirmations, and click **Yes**[![wp-comments-search-confirm-delete-top](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-top.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-top.png) [![wp-comments-search-confirm-delete-bottom](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-bottom.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-bottom.png) Finally you should see MySQL return an empty result set, as it’s trying to do our search again, but now all those entries have been removed[![wp-comments-search-confirm-delete-done](https://www.inmotionhosting.com/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-done.png)](/support/wp-content/uploads/2012/10/phpMyAdmin_wordpress-spam_wp-comments-search-confirm-delete-done.png)
