WordPress.org

Support

Support » How-To and Troubleshooting » How to remove the same text from all comments?

How to remove the same text from all comments?

  • autumnqiu
    Member

    @autumnqiu

    All my comments currently have three additional lines (these lines are identical for all comments) added at the bottom of each comment by an antispam plugin I’ve installed.

    I wish to remove them. But is there a way for me to remove them all at one shot without having to go through every individual comment and deleting those lines?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can use a database program like phpmyadmin to do a search and replace. Here is a sample one for posts that I use:

    update wp_posts set post_content = replace(post_content,’yellowbird’,’bluebird’)

    autumnqiu
    Member

    @autumnqiu

    Hi Beel! Thanks!

    So if I want to completely remove the following three lines of text in the wp_comments database:

    — OSA:
    Final filter result: 0

    What should I enter into PHPMyAdmin? 😛

    My apologies, I am a database/PHP idiot at the moment.

    autumnqiu
    Member

    @autumnqiu

    Uh, anyone can help? Thanks. Because I am not exactly sure what I should enter into PHPMyAdmin.

    Kafkaesqui
    Member

    @kafkaesqui

    update wp_posts set post_content = replace(post_content,'-- OSA:
    Final filter result: 0
    --','');

    Use that under “run SQL query” or the SQL tab on any table page in phpMyAdmin. Enter the spaces just as they exist in the posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove the same text from all comments?’ is closed to new replies.