Forum Moderators: phranque
On the server, in the Public folder, there are currently two subdirectories... mydomain.com, and a WS-FTP log folder.
When the site "goes live," I'd like to move things very quickly. Even if I had broadband, which I don't, it makes sense to have both the old site and the new site standing by online, so they can be switched back and forth easily.
What I'm wondering is whether I can put the new site into a subdirectory in the Public folder and call it, say, "newsite". Then when the moment comes...
- simply rename "mydomain.com" to "oldsite"
- and then change the name of the "newsite" folder to "mydomain.com".
I assume that under the current setup, calling the folder "mydomain.com" is what it takes to get the server to recognize it as the active root folder for the domain.
I'm also assuming that since there's already a WS-FTP log directory in the public folder, additional subdirectories in the public folder shouldn't create problems.
I don't know, though, whether it's considered bad practice to leave an old site in the public folder for a while. We'd like to have the old site standing by until we know there are no major bugs.
The new root will have an .htaccess file redirecting some critical pages... which I hope will make the transition go smoothly.
Tests have shown, incidentally, that the server doesn't seem to like me to remotely move or copy files from directory to directory on the server. It does allow me to rename directories.
When the site "goes live," I'd like to move things very quickly. Even if I had broadband, which I don't, it makes sense to have both the old site and the new site standing by online, so they can be switched back and forth easily.
What I'm wondering is whether I can put the new site into a subdirectory in the Public folder and call it, say, "newsite". Then when the moment comes...
- simply rename "mydomain.com" to "oldsite"
- and then change the name of the "newsite" folder to "mydomain.com".
I assume that under the current setup, calling the folder "mydomain.com" is what it takes to get the server to recognize it as the active root folder for the domain.
I'm also assuming that since there's already a WS-FTP log directory in the public folder, additional subdirectories in the public folder shouldn't create problems.
I don't know, though, whether it's considered bad practice to leave an old site in the public folder for a while. We'd like to have the old site standing by until we know there are no major bugs.
The new root will have an .htaccess file redirecting some critical pages... which I hope will make the transition go smoothly.
Tests have shown, incidentally, that the server doesn't seem to like me to remotely move or copy files from directory to directory on the server. It does allow me to rename directories.
One caveat: Test the new site to make sure it doesn't mind living in a subdirectory. Specifically, you'll be looking for "location conflicts" caused by absolute URLs and <Base> tags.
Hey gang, let's have some more input on this subject - It's a major change! <bump>
Jim
moving a fairly large siteI think the goal is to move to a new version of the site?
In any case, it looks like a good plan to me and jdMorgan has covered most of the issues. If the site uses scripting, there may be a few paths that need to be changed during testing, while the site resides in the offline subdirectory. This may also be true if absolute URL addresses are used anywhere in the site. If so, building a checklist of these "changed" items as they are encountered may be handy to insure they are all "put back to normal" before the site goes live, and to make it easier to switch between the old and new sites when going (or attempting to go! ;) ) live.
>>It would be faster and less disruptive to make a copy of the old site first<<
Is there a way of doing this on the server rather than downloading and then uploading a second copy?
>>This may also be true if absolute URL addresses are used anywhere in the site. If so, building a checklist of these "changed" items<<
Yes, that's been one of the more tedious chores of the project... I have the new site with relative urls online in a test subdirectory now, with some pages with absolute urls standing by for when I know the rest of the site is OK and we're in the actual site directory so they'll work. One of the trickiest parts is changing over some framed content that can only be changed remotely online... but shouldn't be changed until the new site is up (as the path names will indeed be changing).
I've also been dealing with PPC landing page redirects, etc. At this point, I have lists of lists. My main concern is what I can do on the server... and what I can leave in the public_html directory. It's a little different than a local hard drive.
>>It would be faster and less disruptive to make a copy of the old site first<<Is there a way of doing this on the server rather than downloading and then uploading a second copy?
If you can get to a Unix prompt using telnet or any other way, you can do a recursive copy with the cp command, duplicating the entire directory tree. Many versions of FTP will let you pass a command line through to the OS, too.
Jim
Current form, which worked in my tests, is:
RedirectPermanent /oldpage.html [mydomain.com...]
This would be one line for each page. I've seen "RedirectPermanent" split into two words, and/or with different capitalization. I'm taking this form from the Apache documentation.
I'm also assuming that I need to spell out the full domain, ending with the trailing slash, as the redirect destination.
Also... after some debate with myself... I've decided not to redirect some old pages to the new pages that have specifically replaced them, rather than to the root. I'm directing everything to the default home page, figuring that if I redirected the pages to their replacements, if I had any internal linking problems involving the old pages, I'd never find them.
All thoughts welcome.
If you can get to a Unix prompt using telnet or any other way, you can do a recursive copy with the cp command, duplicating the entire directory tree. Many versions of FTP will let you pass a command line through to the OS, too.
Jim... This is total Greek to me, as I don't know Unix... and I'm not sure what telnet is. DOS is as far as I got before they flunked me out. I'm using WS-FTP and the FTP function in Windows Commander, and have Leech FTP standing by... so if one of these will work and you can give me the Unix copy syntax, I'm all for trying it... particularly if I can try it with a test directory first.
Is this something that requires special permissions, or is it just a question of getting to the Unix command line?
Here's a description of the Unix copy command [mcsr.olemiss.edu].
telnet makes your computer act like a terminal plugged into your site host computer. You may have to check with them about login procedures - it can get sticky if the host has to be accessed through a proxy. When connected and logged-in, you get a Unix prompt - a Unix "DOS prompt".
The following two commands, entered while logged into the root of your site, should copy all files in all directories to the new directory "oldsite".
mkdir oldsite
cp -r * oldsite
Foolproof is good, Murphy's-Law-proof is even better!
Jim