Support » Plugins » Kill the Post-less Comment Spam

  • TechGnome


    I know that not everyone got the now infamous “TG’s Code” (thanks Podz). To help follow up on that, the following directions are aimed to delete any posts that may have gotten through before the code was installed.

    1. Open your myPHPAdmin, select your database, then click the “SQL” link.
    2. If you don’t have myPHPAdmin, or your host provided a different interface for your database, open what ever screen necessery to run a SQL Statement.
    3. Enter this SQL:
      DELETE wp_comments FROM wp_comments C LEFT JOIN wp_posts P ON C.comment_post_ID = P.ID WHERE P.ID IS NULL
    4. Click the “Go” button. This will delete any comments that do not have a related post.

    DISCLAIMER: I will only provide MINIMAL support for this. Use at your own risk. This code is provided AS IS, and no warranty is supplied or implied. As always, it is good practice to make a backup before following this. If you don’t and something goes wrong, sorry, but you are SOL. Tax, title, and license extra. Batteries not included. Some assembly required. Not suitable for all ages.

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Kill the Post-less Comment Spam’ is closed to new replies.