Forums

Trying to delete spam comments/trackbacks in phpMyAdmin (2 posts)

  1. Daisyhead
    Member
    Posted 4 years ago #

    I'm trying to help a friend delete HUNDREDS of trackback spams that she received over the weekend and her install of WP is messed up. We are unable to do a "select all" to delete all the comments at the same time.

    What query would I run in phpMyAdmin to delete the spam comments/trackbacks?

    Thanks!
    Daisyhead

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    First, back up the database.

    Next, use as your query:

    DELETE FROM wp_comments WHERE comment_author_url REGEXP "SPAMTEXT";

    Replace SPAMTEXT with a word or phrase that appears in the URL they've supplied. As this removes a record from the database, be certain of the text (and again, back up!).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.