Hi there,
Am I right in thinking the only thing I would need to do to change database for my modx application is change the connection in the config.inc.php file?
I tried doing this and my site just hangs when you try and click a link?
Any ideas....do I need to update the DB details somewhere else?
Cheers,
Justin
It should not be a problem, unless the DB you’re trying to connect to is on a different server (never tried that, and don’t know if we handle external database -> also, you’d have to check with your host about that, lots of them do not allow it).
Of course, another obvious thing is you have to point to a DB with the correct structure (which means, created with a similar version of MODx, beware of differences in DB structure from one version to another, you’ll have to run a proper upgrade in that case).
Last but not least, check the $site_sessionname = "SN************"; matches the one in the DB for the site_id field in modx_system_settings (You’ll note the site_id is prefixed with SN in the config file, add the site_id after the SN)
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Hi davidm,
Thanks for the quick reply. Basically what I am doing is this. Im switching host completly. I was not planning on changing the version of modx....what I was planning was:
1) Changing the DB connection details to get the site working from the new DB (So yes the DB server is running on a different machine)
2) With the adove working I could then just move the files to a new host and point the name server....knowing its all gonna be fine......but alas its not!
Ill have another go at it later on and let you know how I get on......
Cheers.
Hi......
now im a bit confused......there is no site_id field in ’the modx_system_settings’? Im working on version 9.1.
Also I will be working with an external database (ie on not hosted on the same server) and it has worked fine for me in the past.
Cheers,
Check the second page
You’re seeing records from 0 to 30, if I remember correctly, it’s on the second page...
This being said, it seems your problem is connecting to an external DB : connecting from you current host files to your future host DB ?
Not sure this can be done. Easiest thing is, switch altogether... let the actual install in place, make a new install @ your new host, import your DB into it, then when you’re alright modify your DNS...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
-
☆ A M B ☆
- 24,524 Posts
Come to think of it, the very first MODx site I ever did also has the database server on a different server than the website itself. There is no difference, it just needs the hostname of the database server instead of "localhost".
It can work, but lot of shared hosting service won’t allow it...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id