Title: Can&#8217;t delete multiple comments
Last modified: August 18, 2016

---

# Can’t delete multiple comments

 *  [benjy](https://wordpress.org/support/users/benjy/)
 * (@benjy)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/)
 * So, I’ve been hit by a rash of comment spam on footballoutsiders.com , and I 
   just installed a comment preview to try to diminish it. Anyway, I want to delete
   all the existing spam comments in the system, but I’m having trouble.
    When I
   log in as admin, Edit/Comments/Mass Edit Mode/search for, say, “online poker”,
   I get a list of offending comments. If I click on Invert Checkbox Selections 
   at the bottom to select all items in the list (or even if I check one or two),
   and then click Delete, I get nothing. The page just refreshes, with all the comments
   still there. I can delete them one at a time, but that gets tedious after the
   first 100 or so 🙂 Anyone run across this before? Any suggestions? thanks, benjy

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [kejia](https://wordpress.org/support/users/kejia/)
 * (@kejia)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-107888)
 * I’m having exactly the same problem, yes. **Gnash, gnash**
    So. Much. Spam.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-107889)
 * You could try installing Kittens Spam Words ?
    That also features a mass ‘delete
   as spam’ button. [http://mookitty.co.uk/devblog/category/kittens-spam-words/](http://mookitty.co.uk/devblog/category/kittens-spam-words/)
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108263)
 * Same problem here. Would seem like installing another feature is a bit of a cop
   out. Shouldn’t the given delete functionality work instead?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108264)
 * If you install Spaminator as well, the spam will be silently killed (if you turn
   off email notification of the slaughter) and that’s got to be better than any
   delete button ?
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108265)
 * Sure, installing a spam eliminator is a great proactive approach. However, for
   those of us with tiny blogs with minimal traffic who never expected to get found
   and spammed, what we need is the solution to delete the spam now that it has 
   arrived.
    After spending a little time debugging, you need to add the following
   line in edit-comments.php: $delete_comments = $_POST[‘delete_comments’]; In my
   file, it was on line 42. The end result with the before and after lines would
   look like: <?php $delete_comments = $_POST[‘delete_comments’]; if (!empty($delete_comments)){
   The root problem was that $delete_comments was not being populated with the post
   data and was thus not going into the routine to delete the comments. Hope that
   helps someone!
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108266)
 * I also changed the LIMIT on line 68/69 from 20 to 100 to make it a little easier
   to delete the 300+ spam comments I had.
    $comments = $wpdb->get_results(“SELECT*
   FROM $tablecomments ORDER BY comment_date DESC LIMIT 100”);
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108267)
 * “those of us with tiny blogs with minimal traffic who never expected to get found
   and spammed”
    The spammers will google for files they know show a blog is installed.
   Then they will hit you. My daughter’s blog is linked from nowhere. She does not
   ping. She gets hit with spam. She now has Spaminator and Spamwords installed,
   and they do the job very nicely indeed. Up to you though…..
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108268)
 * podz – you still haven’t addressed the issue of being able to delete multiple
   comments….. spam aside, the multiple delete should work. It’s not a problem of
   preventing spam, but once hit, it owuld be nice to mass delete them.
    TG
 *  [achilleas](https://wordpress.org/support/users/achilleas/)
 * (@achilleas)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108285)
 * but mattsmith321 did adress it succesfully!! thanx matt. that line of code saved
   me 752 mouse clicks approximately…

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Can’t delete multiple comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 6 participants
 * Last reply from: [achilleas](https://wordpress.org/support/users/achilleas/)
 * Last activity: [21 years, 6 months ago](https://wordpress.org/support/topic/cant-delete-multiple-comments/#post-108285)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
