WordPress.org

Ready to get started?Download WordPress

Forums

How to remove the same text from all comments? (5 posts)

  1. autumnqiu
    Member
    Posted 8 years ago #

    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!

  2. Beel
    Member
    Posted 8 years ago #

    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')

  3. autumnqiu
    Member
    Posted 8 years ago #

    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? :P

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

  4. autumnqiu
    Member
    Posted 8 years ago #

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

  5. Kafkaesqui

    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.