People are often moving their web site from one server to another. A lot of times if this is not planned correctly it might not go as expected. So I thought I would share some tips.
- Make sure you have the full login to the domain’s registrar. Don’t take your clients word that they have it. Don’t assume they have it. Test it yourself before you even think about starting or scheduling the process.
- Copy files from one server to the other. If you are lucky they both have shell access and you can do a scp. (server to server copy, very fast). If you must, you have to use ftp.
- Copy over all databases.
- Change all configuration information in all scripts. Including: database connection information, paths etc..
- Make sure all paths that need to be set to special permissions. (usually upload paths need to be set to 777). If you are lucky and got to use scp, odds are the file permissions stayed.
- Make sure there are no absolute links to the domain (for example http://www.domain.com/). If found, change them to relative links. Reason is that during testing, you’ll click on these links and end up on the old server. You want make sure you are testing on the new server at all times.
- Start testing. Test everything. Make sure you use the new servers temporary address. Be sure to look at the URL as you test and make sure it stays at that address. If it changes to the domain name, you didn’t get rid of all absolute links in #5
- Make sure to set up all email accounts on the old server so they are exactly the same as the old server. IF you forget any, odds are this person will lose some email. (if you are just changing email or just the web site see blelow)
- Once you are sure everything is working, then and only then change the domain name’s nameserver. It will take up to 72 hrs for everything to move over, so make sure to tell your users to check both the new and old emails accounts untill after 72 hrs (usually you can give them a direct web address to access the email that doesn’t use the domain name.. check with the hosting companies)
IF you are just changing MX records. You only need to setup the email accounts. If you are only changing the web site, just change the A names.