[SOLVED] How exactly do you move a site up one directory level?
[SOLVED] How exactly do you move a site up one directory level?
Does anyone know the best way to move a CMSMS site up one level from a domain's sub directory to the root directory? I am hosting via GoDaddy (linux server). MySQL version 5; php version 4.(something); CMSMS version 1.2.5.
It is my understanding that you first need to clear the cache in your CMS install, then move the files, and then edit config.php to reflect the new site path.
I'm not exactly clear on how to specify the new site path in config.php.
Two questions:
1. The site path is mentioned numerous times in config.php. Do you have to change[ i] every [/i] instance in which the site path is listed?
2. When modifying a directory string in config.php, what exactly should I be changing, and what exactly do I need to leave alone? Directory strings in config.php include what appears to be additional information that (as a newbie) I find a bit confusing. For example, directory strings in this file often add /html/ between the root directory and the sub directory. Should the /html/ be left in the string when I make my update?
Thanks again for any help you can be offered. Site migration is definitely trickier than I thought.
It is my understanding that you first need to clear the cache in your CMS install, then move the files, and then edit config.php to reflect the new site path.
I'm not exactly clear on how to specify the new site path in config.php.
Two questions:
1. The site path is mentioned numerous times in config.php. Do you have to change[ i] every [/i] instance in which the site path is listed?
2. When modifying a directory string in config.php, what exactly should I be changing, and what exactly do I need to leave alone? Directory strings in config.php include what appears to be additional information that (as a newbie) I find a bit confusing. For example, directory strings in this file often add /html/ between the root directory and the sub directory. Should the /html/ be left in the string when I make my update?
Thanks again for any help you can be offered. Site migration is definitely trickier than I thought.
Last edited by vangabond on Wed May 21, 2008 8:36 pm, edited 1 time in total.
Re: [SOLVED] How exactly do you move a site up one directory level?
So how did you solve this? I was hoping to do the same thing.
Re: [SOLVED] How exactly do you move a site up one directory level?
If you are moving it from root/cmsms to root then all you need to do is remove any instance of /cmsms...
Leave all other paths alone, the ones that have /home/something/public_html/ or some such wording are server paths...
Leave all other paths alone, the ones that have /home/something/public_html/ or some such wording are server paths...
Re: [SOLVED] How exactly do you move a site up one directory level?
A step by step guide for the record:
first make a backup, this is recommended but not mandatory)
- backup entire site (files) through ftp (just to be sure)
- backup entire database through phpmyadmin or other tool
- login to the cmsms site, goto the admin panel and push the button 'clear cache'. logout after that.
- now, open up a ftp program and login as admin or root, you need full access rights.
- go to the root where you are planning on moving the site, in this case one folder up, and check if there's any files like index.html, index.php etc. backup any files in that folder and remove them from the server just to be sure. know what ur doing!
- now, with most ftp programs it should be possible to move (I use SmartFTP) de entire content from the subfolder to the root by dragging the files to the root on the server. this is really fast. other way would be to delete the entire subfolder and copy all the files back to the server from the backup you created earlier.
- now, open you local (backup) copy of config.php in a text editor
- do a search for all instances of the subfolder name and edit the found lines so that they point to the root. pay close attention to the usage of slashes, lines do not have a slash at the end.
example:
the following line in config.php:
$config['root_url'] = 'http://www.domain.com/website';
would change in:
$config['root_url'] = 'http://www.domain.com';
- only change the lines where there's a 'real' path. some are relative to the root and don't need editing.
- save the local config.php file and copy it to the root, overwrinting the old one.
That's it, no changes neccessary in the database etc. it should work now instantly.
first make a backup, this is recommended but not mandatory)
- backup entire site (files) through ftp (just to be sure)
- backup entire database through phpmyadmin or other tool
- login to the cmsms site, goto the admin panel and push the button 'clear cache'. logout after that.
- now, open up a ftp program and login as admin or root, you need full access rights.
- go to the root where you are planning on moving the site, in this case one folder up, and check if there's any files like index.html, index.php etc. backup any files in that folder and remove them from the server just to be sure. know what ur doing!
- now, with most ftp programs it should be possible to move (I use SmartFTP) de entire content from the subfolder to the root by dragging the files to the root on the server. this is really fast. other way would be to delete the entire subfolder and copy all the files back to the server from the backup you created earlier.
- now, open you local (backup) copy of config.php in a text editor
- do a search for all instances of the subfolder name and edit the found lines so that they point to the root. pay close attention to the usage of slashes, lines do not have a slash at the end.
example:
the following line in config.php:
$config['root_url'] = 'http://www.domain.com/website';
would change in:
$config['root_url'] = 'http://www.domain.com';
- only change the lines where there's a 'real' path. some are relative to the root and don't need editing.
- save the local config.php file and copy it to the root, overwrinting the old one.
That's it, no changes neccessary in the database etc. it should work now instantly.
Re: [SOLVED] How exactly do you move a site up one directory level?
Hello,
remember forum members are free to contribute to the wiki.
Have fun with CMSms
Pierre M.
remember forum members are free to contribute to the wiki.
Have fun with CMSms
Pierre M.
Re: [SOLVED] How exactly do you move a site up one directory level?
@bug2fix
The part about clearing the cache should be done before backup...
The part about clearing the cache should be done before backup...
Re: [SOLVED] How exactly do you move a site up one directory level?
lol... i have build a few sites with cmsms now but have never seen that button O.o- login to the cmsms site, goto the admin panel and push the button 'clear cache'. logout after that.
could someone be so kind and tell me where it is to be found?
greets rootkid
EDIT:// note to self: open your eyes! Admin/Global Settings/3rd Button from top ^^
Last edited by rtkd on Thu Jul 10, 2008 7:47 am, edited 1 time in total.
Re: [SOLVED] How exactly do you move a site up one directory level?
This particular guide (below) is one of the most helpful I've found for a newbie. Can someone more knowledgeable than me add it to the documentation under Moving CMSMS to the root? or some similar topic? (Different from what's there under Copying to a New Server). That way people don't have to figure out how to find it in the Forum, and the question won't have to be answered over and over again.
-- Twwitt
-- Twwitt
bug2fix wrote: A step by step guide for the record:
first make a backup, this is recommended but not mandatory)
- backup entire site (files) through ftp (just to be sure)
- backup entire database through phpmyadmin or other tool
- login to the cmsms site, goto the admin panel and push the button 'clear cache'. logout after that.
- now, open up a ftp program and login as admin or root, you need full access rights.
- go to the root where you are planning on moving the site, in this case one folder up, and check if there's any files like index.html, index.php etc. backup any files in that folder and remove them from the server just to be sure. know what ur doing!
- now, with most ftp programs it should be possible to move (I use SmartFTP) de entire content from the subfolder to the root by dragging the files to the root on the server. this is really fast. other way would be to delete the entire subfolder and copy all the files back to the server from the backup you created earlier.
- now, open you local (backup) copy of config.php in a text editor
- do a search for all instances of the subfolder name and edit the found lines so that they point to the root. pay close attention to the usage of slashes, lines do not have a slash at the end.
example:
the following line in config.php:
$config['root_url'] = 'http://www.domain.com/website';
would change in:
$config['root_url'] = 'http://www.domain.com';
- only change the lines where there's a 'real' path. some are relative to the root and don't need editing.
- save the local config.php file and copy it to the root, overwrinting the old one.
That's it, no changes neccessary in the database etc. it should work now instantly.
-
- Forum Members
- Posts: 116
- Joined: Mon Jul 28, 2008 4:48 pm
- Location: Cambridge, UK
Re: [SOLVED] How exactly do you move a site up one directory level?
I usually develop sites in a sub-directory a move up a level on go-live. It's quite easy to do. I would add a couple of items to the list.
1. Don't forget to edit the htacces file if you've made mention of the sub-directory name, e.g. change
to
2. I've always had to uninstall and then re-install the Captcha module to make any FormBuilder forms work after the move - just click the 'Uninstall' link and then the 'Install' link on the Modules screen and check the Captcha settings
Nick
1. Don't forget to edit the htacces file if you've made mention of the sub-directory name, e.g. change
Code: Select all
RewriteRule ^(.*).html$ /devsite/index.php?page=$1
Code: Select all
RewriteRule ^(.*).html$ /index.php?page=$1
Nick
Re: [SOLVED] How exactly do you move a site up one directory level?
Please, can you write a few notes in wiki?Nick Smart wrote: I usually develop sites in a sub-directory a move up a level on go-live. It's quite easy to do. I would add a couple of items to the list.
Alby