MyBB Community Forums

Full Version: Change one domain to new domain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,

I bought a new domain, but still using the same host. 

What are the steps needed to switch the current website from one domain to another? 

Thanks!

Website: https://boogaloocrews.com/index.php
Log into your admin and change bburl and homepage url
Sorry if I was late but thank you! We managed to successfully change the domain.

My follow up question, is there a way to mass change all the links at once so it goes from the old domain to new ones?
(2021-04-17, 09:32 AM)ShineCero Wrote: [ -> ]Sorry if I was late but thank you! We managed to successfully change the domain.

My follow up question, is there a way to mass change all the links at once so it goes from the old domain to new ones?

Easier way would be, you can use the Filter inside Admin CP > Settings > Filter
Rewrite the older domain with new one and your redirect will start happening. It will not change older domain name inside posts at DB level, but it will filter with new domain name.

If you wish to change the domain mentioned inside everypost at database level, then you can run a SQL query to select all the older posts with older domain and replace it with new one.

Regards
WallBB
I'd assume you are talking about Word Filter, right? That's the only filter link I've seen on the Admin CP (my mistake if this wasn't it).

And yes, I would like to change the old domain inside every post at database level. What SQL query do I need to run to accomplished this? Smile
What text exactly gets replaced? If it's example.com to newtext.com, then this will work.

BACK UP THE TABLE FIRST!

UPDATE `mybb_posts` SET `message`=replace(`message`, 'example.com','newtext.com') WHERE `message` another like '%example.com%' 

phpmyadmin gives me a chance to Simulate Query. It tells me how many records are going to be changed. If that corresponds with what I'm expecting, then I give it a Go.

Not sure if the text strings need special characters to be escaped. If you know a record to change and want to test the single record, then add another condition.
UPDATE `mybb_posts` SET `message`=replace(`message`, 'example.com','newtext.com') WHERE `message` like '%example.com%' AND `pid`=1