The MU forums have moved to WordPress.org

Where can I delete excessive spam messages (11 posts)

  1. dennists
    Member
    Posted 15 years ago #

    We have a teacher who wasn't watching his comments waiting in moderation and now has 34,000 spam comments. Most are inappropriate or sales pitches. Is there a place on the blog or on the blog server where you can delete all the spam messages at once?

  2. easysleeper
    Member
    Posted 15 years ago #

    you could write a script to query the db for comments marked as spam and delete them.

    I can post an example if you need it. Also I would recommend using reCaptcha, I use it and it works like a charm to stop spam comments.

    http://wpmudevorg.wordpress.com/project/WP-reCAPTCHA

  3. easysleeper
    Member
    Posted 15 years ago #

    <?php
    global $wpdb;
    $removespam = 'DELETE FROM wp_X_comments WHERE comment_approved="spam"';
    $wpdb->query($removespam);
    ?>

    the X above should be replaced with the blog number of the person you want to remove spam messages from.

    Also wait for one of the experts to approve this method I would hate for it to cause unknown problems. I am just thinking that is how I would do it.

  4. tdjcbe
    Member
    Posted 15 years ago #

    I use it and it works like a charm to stop spam comments.

    ...as well as those who can view those images either because they can't see them or they're behind some sort of proxy.

    If you;re not currently using any solution, you may want to give this a read:

    http://wpmututorials.com/plugins/stopping-spam-comments-sitewide/

    Try this method though to solve your issue:

    http://articles.rootsmith.ca/wordpress/deleting-massive-amounts-of-comments-in-wordpress

    If you are using some sort of method to combat spam where the comments are already marked as such, the software changes "comment_approved" to 'spam'. You can use the SQL mentioned in that article. I'd just do the check against "comment_approved" instead of looking for terms.

    Bother Typepad Antispam and Akismet have a check box that will autodelete spam after I believe 15 days. You may want to suggest that to anyone who doesn't keep up on that sort of thing.

  5. Bike
    Member
    Posted 15 years ago #

    If it is all in one blog, just go to Comments -> Spam -> delete all spam. One click and they are gone :)

  6. easysleeper
    Member
    Posted 15 years ago #

    Oh, that's just too easy ;) I knew there was a better solution than my own.

  7. argh2xxx
    Member
    Posted 14 years ago #

    Let say you delete a spam comment, this is not going to break a member's blog? Or let say you delete a spam blog post, this is not going to break a member blog too? Or how about let say delete a single spam blog from a member, this is not going to break the wpmu as a whole? By the way doing all this inside mysql or phpmyadmin I meant.

  8. andrea_r
    Moderator
    Posted 14 years ago #

    As long as you know what you are doing then, no it's not going to break anything.

  9. tdjcbe
    Member
    Posted 14 years ago #

    You may get an error about missing comments but the system (edit: meaning wpmu) should correct itself.

  10. argh2xxx
    Member
    Posted 14 years ago #

    Know a link that I can read on how WPMU's database works? I need to understand its inside out for me to work with it efficiently and less error prone. Thank You!

  11. andrea_r
    Moderator
    Posted 14 years ago #

    Why are you deleting these thing right out of the databse? Why not from the backend?

    Only do it via the database if you:
    a) have a LOT to delete
    b) can run a SQL statement to do so
    c) know what you're doing

    Because that kind of work is a whole lot more in the realm of database theory & management and less about WPMU in particular.

    That being said, a short article from the codex:
    http://codex.wordpress.org/WPMU_Database_Description

About this Topic

  • Started 15 years ago by dennists
  • Latest reply from andrea_r