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

Brandon Sheley

Well-known member
Licensed customer
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
 
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.
 
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.
Thanks Brogan, exactly what I was after :)
Another trick is to put the old site to new site as a bad word in the censoring list :)
ah great idea, I'm going to go this route for now (y)
 
Back
Top Bottom