Page 1 of 1

CMSMS install - changing domain name

Posted: Thu Jul 02, 2015 2:48 am
by sandaha
Hello all,

So I have developed a CMSMS website for a client and launched it yesterday. All working fine (other than a couple of styling issues that I'll be fixing later). However, the client has now decided that they don't like their chosen domain name and have decided to change it to a new domain name. To be clear though the site won't be moving from one server to another. It's only the domain name that will change.

Other than changing the primary & secondary dns to the new domain name I'm aware I will need to change some settings in cmsms. Reading through the forums I see that specifically I'll need to edit my config.php file, the line about the rout URL. However, when I look at my config.php file there's no line for route URL. Am I missing something here? Can anyone advise the steps I need to take to do this? Below is my config file:

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'removed';
$config['db_password'] = 'removed';
$config['db_name'] = 'removed';
$config['db_prefix'] = 'cms_';
$config['timezone'] = 'Australia/Sydney';
?>

Re: CMSMS install - changing domain name

Posted: Thu Jul 02, 2015 7:20 am
by velden
This will be a very simple process for recent versions of CMSMS

root_url isn't defined by default anymore in config.php. CMSMS will take the root_url from the used domain name automatically. You can however force a root_url by adding it in the config.php (read pdf file that comes with default install in /doc folder.

If you made everything right (using {root_url}, {uploads_url}, {cms_selflink} in templates and/or content, [[root_url]], [[uploads_url]] in stylesheets) then you will be good.

You might need to clear the cache of cmsms after the domain name change.
If you use CGSmartImage module check the settings of it; iirc it stores an url to be used for cached images.

Maybe you want to setup some mod_rewrite rewrite rules to redirect visitors (and search engines) that use the old domain name to the new domain name. Though this is not CMSMS specific.

Re: CMSMS install - changing domain name

Posted: Fri Jul 03, 2015 12:05 am
by sandaha
Thanks Velden for the detailed reply

Re: CMSMS install - changing domain name

Posted: Fri Jul 03, 2015 6:49 am
by staartmees
You can find CMSMS_config_reference.pdf in the /doc of your cms