• 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?

Brandon Sheley

Well-known member
#1
Hello,

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

Code:
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.

Thanks
-Brandon
 

Brogan

XenForo moderator
Staff member
#3
A simple query will do it.
Code:
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.