[SOLVED] Moving to a new domain

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
RAZZ
New Member
New Member
Posts: 3
Joined: Tue May 14, 2013 9:59 am

[SOLVED] Moving to a new domain

Post by RAZZ »

Hi,

I need to move a CMS Made Simple site to a new URL, but I can't find the information on how to do that.

I did search, but all I have found is old info about changing some settings in config.php. It seems config.php has had its responsibilities reduced quite considerably since that info was generated.

I am using version 1.11.2.1


Thank you in advance!
Last edited by RAZZ on Tue May 21, 2013 9:32 am, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Moving to a new domain

Post by Jos »

This is the documentation about moving your site to a new server: http://docs.cmsmadesimple.org/moving

If you only change the url, I guess you only need to change urls in config.php and clear cache.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Moving to a new domain

Post by velden »

Latest versions of cmsms indeed do not need path/url info in config.php.

So indeed, changing a domain name involves:

- clear cache
- double check config.php for path/url (because you still CAN use it)
- hope you never used absolute url's in templates/style sheets or change them to be dynamic ([root_url] / {root_url})

One important thing could be cms mailer and/or other mailing modules (NMS/FormBuilder) as some providers don't allow to 'spoof' mail address NOT from the own domain.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Moving to a new domain

Post by Dr.CSS »

If you move a new version of CMSMS install to another server it may be best to run the install(from the same version) again BUT IN STEP 5 DON'T CREATE TABLE OR INSTALL DEFAULT CONTENT as the config doesn't hold the root URL it is registered somewhere and this will correct any problems...

Or put the new root URL in config...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Moving to a new domain

Post by velden »

Dr.CSS wrote:If you move a new version of CMSMS install to another server it may be best to run the install(from the same version) again BUT IN STEP 5 DON'T CREATE TABLE OR INSTALL DEFAULT CONTENT as the config doesn't hold the root URL it is registered somewhere and this will correct any problems...

Or put the new root URL in config...
I don't agree. Should be possible to just copy the site and import database. I do believe the root URL is calculated and not registered.

New install is way too much effort.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Moving to a new domain

Post by Dr.CSS »

It would not be a new instal...

Move site and DB.
Add same version install folder.
Run install,
but at step 5 where you add the DB info pointing at the existing imported DB un-check the 2 check boxes so it uses the new imported DB.......

I've moved so many sites I can't even count and this is the best way to fix path problems...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Moving to a new domain

Post by velden »

I still do not agree because I believe there should be no path/url problems.

Or they are configured in config.php or they are calculated at runtime.

That said, I'm not an expert. Moved several sites lately and did never do a reinstall in those cases.
RAZZ
New Member
New Member
Posts: 3
Joined: Tue May 14, 2013 9:59 am

Re: Moving to a new domain

Post by RAZZ »

velden wrote:Latest versions of cmsms indeed do not need path/url info in config.php.

So indeed, changing a domain name involves:

- clear cache
- double check config.php for path/url (because you still CAN use it)
- hope you never used absolute url's in templates/style sheets or change them to be dynamic ([root_url] / {root_url})

One important thing could be cms mailer and/or other mailing modules (NMS/FormBuilder) as some providers don't allow to 'spoof' mail address NOT from the own domain.
This seems to work, so thank you very much!

I testet it by moving the site to a sub directory (domainname.xx/test/) and clearing the cache. Success!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: [SOLVED] Moving to a new domain

Post by velden »

When moving to/from a subfolder AND using Pretty Urls (mod_rewrite) you might need to change a line in .htaccess

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /test
RAZZ
New Member
New Member
Posts: 3
Joined: Tue May 14, 2013 9:59 am

Re: [SOLVED] Moving to a new domain

Post by RAZZ »

Thank you again, velden.

In my case, I am moving to an entirely new domain, and not using pretty URLs, so it will not apply to me.

But you have just made this thread a lot more useful for others, and for that, sir, you deserve a cookie!
Locked

Return to “[locked] Installation, Setup and Upgrade”