• I’m resurrecting an old blog that got over 2000 spam comments while dormant. Problem is, when I flag all the comments and try to mark them as spam (or move them to trash) I get the “Request-URI Too Large” error message. Is there a simple workaround for this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Try using Akismet: https://wordpress.org/plugins/akismet/

    In the Comments section, you’ll get a “Check for Spam” button, and in the Spam section you’ll get a “Empty Spam” button.

    Those should bypass the traditional bulk action limitations.

    In addition to Akismet, and if you use a contact form on your site, just remove your old contact form and install Contact Form 7 by Japanese Takayuki Miyoshi,

    https://en.wordpress.org/plugins/contact-form-7/

    It’s spam bulletproof and translated into more than 50 languages. Not to mention you can plug it to any solution for analytics (accepts any call for events).

    Also, if spam is issue don’t forget to disable comments after 30 days or so in WordPress global settings. (7, 15 days according to your need).

    Hope it helps,

    After for deleting this large amount of comment spam, take the wp_comments table, and use regex.. I see no other option .. Try to find patterns in the whole lot.

    <?php

    if (!empty($detection))
    {

    if (preg_match(“/\viagra\sex\drug\b/i”, “PHP is the website scripting language of choice.”)) {
    echo “A match was found.”;
    $sql = ‘DELETE FROM localhost_db WHERE detection !=”” ‘;

    }
    ?>

    A super rough test, this script is 100% buggy and will generate errors.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    If you do the regex above, *please* make a backup first: https://codex.wordpress.org/WordPress_Backups

    Thread Starter wbtt_admin

    (@wbtt_admin)

    I installed Akismet and got an API key but when I try to use it I get this error:

    Fatal error: Call to undefined function set_url_scheme() in /home/username/whobuysthesethings.com/wp-content/plugins/akismet/class.akismet.php on line 882

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    I recommend contacting them about that via https://akismet.com/contact/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘problem deleting large amount of spam’ is closed to new replies.