1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 How do I change all phrases in a post to something else?

Discussion in 'XenForo Questions and Support' started by Brandon Sheley, Nov 24, 2011.

  1. Brandon Sheley

    Brandon Sheley Well-Known Member


    I want to change a url that's mentioned in post on both my xenforo 1.1.0 sites to something else and need help with a query.

    I need to change a siteA.com to siteB.com on my forums, something like

    SELECT FROM the xf_post table
    FIND siteA.com
    and UPDATE it to  siteB.com 
    This is just in the post table for now. The reason is because of the nature of my forums and mergers, we'll have dead links through out the forums to old domains, I'd like them all to point at the current forum domain.

  2. Fuhrmann

    Fuhrmann Well-Known Member

  3. Brogan

    Brogan XenForo Moderator Staff Member

    A simple query will do it.
    UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
    Take a backup first in case of any problems and you need to roll back.
    Brandon Sheley likes this.
  4. Floris

    Floris Guest

    Another trick is to put the old site to new site as a bad word in the censoring list :)
    Brandon Sheley likes this.
  5. Brandon Sheley

    Brandon Sheley Well-Known Member

    Thanks Brogan, exactly what I was after :)
    ah great idea, I'm going to go this route for now (y)

Share This Page