Help: Lost CMSMS DB after changing domain name

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Mutchy
New Member
New Member
Posts: 3
Joined: Wed Oct 17, 2012 9:05 am

Help: Lost CMSMS DB after changing domain name

Post by Mutchy »

Hi, and first up sorry. I am definitely a noob with CMSMS.

OK - I have taken over editing a site that someone else made up in CMSMS. I worked out the basics and made the required changes.
Then the client requested that we change the domain name of the site to a different domain name.
Now that this is done the site shows its pages but has lost all of its related CSS etc.
The database still exists but I can't log into CMSMS now that the domain has changed. It used to be as simple as www.domain.com/Admin or just use the login button on the home page of the site but now neither of these work.
How can I tell the database or the CMS that it needs to use the all the previous themes pages links etc but now with the changed domain name?
Any help would be greatly appreciated, thanks.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Help: Lost CMSMS DB after changing domain name

Post by velden »

you shoud have a look at the config.php file in the webroot. There are some important setting which can be changed.

You might be able to access it by FTP or maybe your providers web-admin interface. It could (should) be write write protected (if one followed the online install advice). Normally you can make it writable yourself (chmod 666 or something)

If the previous admin did his job wel he has used cmsms variables in the templates, stylesheets etc. so those change automatically after changing the config.php
Mutchy
New Member
New Member
Posts: 3
Joined: Wed Oct 17, 2012 9:05 am

Re: Help: Lost CMSMS DB after changing domain name

Post by Mutchy »

Thanks Velden.
OK since posting I have managed to get the pages look Ok now and can also now log into the CMS itself. I parked the old domain at the host for the new domain and that now seems top redirect all fine.

But basically it logs me into the CMS at the old domain. When I check the system info tab within the CMS it tells me that the http root and https root is still the same as the old domain. Also, when I look at the HTML code of the pages each link is absolute and uses the old domain as the domain name. Wish the links were relative and simply related back to the root folder rather than to the domain name.

Anyway, I will also try to check the config.php file to see what it says.
Do you think that if I find it is pointing to the wrong domain and I correct just this file, then the CMS will correct itself automatically? Will I need to do anything else?

Thanks for your help.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Help: Lost CMSMS DB after changing domain name

Post by velden »

Mutchy wrote: But basically it logs me into the CMS at the old domain. When I check the system info tab within the CMS it tells me that the http root and https root is still the same as the old domain.
I don't know how your provider does things when adding/changing a domain name but it is possible to change a domain name and NOT change the paths of your hosting.
Mutchy wrote: Also, when I look at the HTML code of the pages each link is absolute and uses the old domain as the domain name. Wish the links were relative and simply related back to the root folder rather than to the domain name.
Look at the config file. If the previous developer used variables (which translate to absolute paths in the html source) they change automatically after changing the config. A wish comes true then.
Mutchy wrote: Anyway, I will also try to check the config.php file to see what it says.
Do you think that if I find it is pointing to the wrong domain and I correct just this file, then the CMS will correct itself automatically? Will I need to do anything else?

Thanks for your help.
Worth trying I guess.
Mutchy
New Member
New Member
Posts: 3
Joined: Wed Oct 17, 2012 9:05 am

Re: Help: Lost CMSMS DB after changing domain name

Post by Mutchy »

Velden, you are a genius, a GOD, and a very nice fellow.
Thank you so much.

Yes!
editing the config.php file and the $config['root_url'] =xxx and the $config['ssl_url'] =xxx lines fixed the problem and now all works properly.

Thank you so much. ;D
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Help: Lost CMSMS DB after changing domain name

Post by velden »

Please thank the developers of CMSMS. They made it that simple to move a website from one domain to another.

Glad it worked out for you.

Regards.
Post Reply

Return to “CMSMS Core”