Moving Servers Can Be Like Moving House

Posted On: 2007-10-01

Even though we haven't actually moved house it certainly seemed as though we were moving house this weekend. What we did do was move one of our local .com sites to the equivalent .com.au domain on an Australian server.

Fortunately everything went reasonably smoothly and after just an hour or so the 301 redirect went into htaccess file on the .com name and the site was live on the Australian server. But how would you go if you had to move a site from one server to another?

Would you be able to get everything moved smoothly if you had to do it yourself or would have problems that would make moving servers look like moving house?

Of course, if you're staying within the same TLD and you can maintain your file structure on your new server you're not going to have too many hassles at all but if you're making a move to a new TLD ... well things can become harder - especially if you've used absolute URLs instead of relative URLs on all of your links.

So here are a few tips about moving and some of the techniques we use when building websites that makes a move a whole lot easier.

Navigation
For various search engine related reasons we always use absolute URLs in all of our links. If you're simply moving a site to a different server within the same TLD then that's not going to be a problem but if, like us, you're moving it to an entirely different TLD you could be looking at scores of navigation links that have to be changed.

Fortunately for us we had used a server side include to call a text file that contained the internal navigation links on the site we just moved. That meant that instead of having to go through and change every navigation link on every page of the site we changed one text file and that changed every link that appeared on the site.

Mirror images
We were taught right from the time we first started in this industry to maintain an exact mirror image on a hard drive here at home of every site we have on the Net. When either of us have wanted to make changes to the site the changes have always been saved to that master file so we always have a complete copy of the site in case something goes wrong on the server.

Of course things rarely go wrong on the server but if you want to change to a new server all you have to do is upload that master copy and you know that all your files are going to be there. Without that master file or mirror image you could upload an incomplete version of the site that's going to need a lot of work to get it back into the same shape it was in on the old server.

Email Addresses
Always make sure that you have changed any email addresses that might appear on the old site to reflect the new TLD and make sure you've set up the admin on the new server to be able to handle those old email addresses.

After a few years in this business you will find that you'll amass quite a few email addresses associated with your various sites and it's a good idea to maintain a written record of those addresses. If you rely solely on your memory you're almost guaranteed to forget to change at least one important email address during the move.

Cron jobs and other backups
Be sure to set up your new location to handle any cron jobs and other backups you may have had scheduled on the old server. It's easy to forget because those things that just happen in the background are out of sight and out of mind.

Export files
If you're running something like a WordPress blog, be sure to check to see if you can export the files from the old server and then import them to the new one. It's going to save you a huge amount of time if you can do something like that and the blog we run on the site we just moved was functioning on the new server in less than five minutes.

Htaccess files
If you've got a htaccess file in place for the site that you moved make sure that all the permissions in that file relate to where the site has been moved. If the site you moved pulls in images from other sites you own be sure to add the new URL to the htaccess files on those sites.

Red crosses or rude messages about stealing content don't look good ... and when they're telling you that you've stolen your own content they can be downright embarrassing.

Check, check, check
Never accept that a move has been completely successful until you've checked every page to make sure that it is appearing and then checked every link on every page to make sure they work too.

Moving sites is never a fun job but if you prepare for it in advance and check everything once the move has been made it can be a lot less painful than it might otherwise be.