Recently, JoeTech.com had a lot of down time. This was because I’ve been working hard to promote it and apparently, it’s been working. The solution was to move from my older server with very little RAM to a faster one with more RAM and updated software. You can’t just jump into something like this, though. If you don’t want a nightmare move, you need a migration plan. Here’s my migration plan for moving any data-driven web site.

1. Give notice
Whenever possible, give notice to your readers/visitors/users that your site will be down during a specified period of time for planned migration. Ideally, this time should be in the middle of the night (to most of your visitors), to minimize the inconvenience. Unfortunately, when you’re site is in need of moving quickly in order to stay up, this step sometimes must be skipped (as was the case for JoeTech.com).
2. Prepare DNS for the move
Whether you handle your own DNS, or someone else does it for you, you should make sure that the TTL (Time To Live) for all your DNS records are set to something like an hour. This should be done 48 hours before your move at the very least. Doing this will ensure that when you move the site and switch the IP address in the DNS records, people will get to the new location quickly. If you want to double-check the site before it comes back up, add in a new “A” record that already points to the new server’s IP address. I like to call this “A” record “new.mydomain.com”. If you do this, step 5.5 below will be to visit new.yourdomain.com in a web browser and click around to test things.
3. Take inventory
Make a list of everything that needs to move. You already know that your web directory and database need to move, but are you forgetting anything else? Does your web server have a special setup for your site? Do you have any cron jobs running that you’ll need set up on the new server? If someone else developed your site and you are not sure about this step, ask them.
4. Put your site on “hold”
Create a small page that just has your site logo and something to the effect of “Sorry. We’re moving to a faster server. We’ll be back in an hour or so.” Put this page in place of your web directory and make sure NO pages on your site can be accessed. Keeping people out of any page will result in no loss of data.
5. Move all your files and data over
Now that the database is sitting idle, it’s safe to move everything without losing anyone’s changes, posts, comments, etc. This often takes the most time, but I like to sit and watch it because I just feel better knowing there were absolutely no errors. Getting your new server to point to the right web files and data will depend on how your server is set up. Many servers come with Plesk or CPanel already installed and you’ll just need to follow their instructions on how to get your site and database set up before moving everything.
6. Set up Email, cron, etc.
If your email goes through an account on your server or you have any cron jobs or additional setup to do on the new server, do it now.
7. Bring it back to life
Once everything is set up, you should cross your fingers, say a little prayer, and then bring your site back to life. To do this, simply swap the IP address in the DNS to the new server’s IP and you should see your site come up pretty quickly.
8. Restore longer TTL
After a day or so, change the TTL in your DNS records back to what it was before (could be a day or a week). If you forget to do this and leave the TTL at 1 hour, it can create an unnecessary burden on your DNS server.
If everything goes well, you should be able to move a data-driven site or blog with very minimal downtime and no big problems. Planning ahead can save you from a lot of headache and embarrassment, so plan ahead and have an easy migration.
Related posts:


















[...] 19th 2008 2:55am [-] From: joetech.com [...]