How do I move my websites between Grid services?


Browse by products and services

  • Applies to: Grid
    • Difficulty: Hard
    • Time Needed: 120
    • Tools Required: SSH, FTP Client, DNS Control

Overview

Moving a site from one Grid to another can vary in difficulty and time-investment depending on what needs moving. Before you begin, you will of course need to have two Grids. You may add the service through your AccountCenter.

NOTE:

  • This article is intended for advanced users only. Migrating a website can be a time-consuming task with a high likelihood of unexpected complications. We encourage you to dedicate a solid chunk of time to this process if you are unfamiliar with the process.
  • (mt) Media Temple is currently in active development of tools that will automate many parts of this migration process. We will let our customers know when this is available for use.

move_to_mt_560x240

CloudTech Can Help!
(mt) Media Temple offers assisted site migrations via CloudTech, our premium services division. To learn more, please click here.

Preliminary Checklist

First, we'll cover what generally needs to be accounted for when migrating a website. Depending on your usage, some of these things may not apply to you.

  • Website content
  • DNS
  • Databases
  • Cron Jobs
  • SSL Certificate
  • Email addresses
  • Email aliases
  • MySQL GridContainer

These are the most common things that are normally associated with the typical site. It's best to first determine which of these applies to you. Make a checklist for yourself to keep track of your own progress as you perform the migration.

Get the new service set up

If you haven't already, go ahead and set up the new service from within your AccountCenter.

NOTE:

We recommend using something other than a subdomain of your primary domain. Example: new-example.com not new.example.com.

Take a look at Adding/Ordering a server for information on adding new services.

Let's get movin!

Below, we outlined the process of transitioning each aspect of your website to the new server.

Website content

Using FTP/SFTP

Log into your current server using an FTP client and download the contents of the example.com directory located under the domains folder to your local computer. Once this is completed, connect to your new server via FTP, navigate to the domains folder and upload the directory that you saved earlier. For detailed information on FTP, please see: Using FTP/SFTP.

DNS

Lower TTL

One thing that can drastically help reduce the DNS propagation period for when you're ready to do the switch is lowering your domain's TTL (Understanding TTL (time-to-live)) setting in advance. Doing this about 24 hours before you're planning on changing DNS to point to the new server will save you lots of time as it will make the new DNS records take in about 5-15 minutes instead of 12-24 hours. You want to lower the TTL of any domain you are planning to move right away, even if you dont plan on switching DNS to the new server for a while.

If DNS is hosted by (mt)
If you are moving the domain on another server on the same account:

  1. Log into your AccountCenter.
  2. Click on the domain for which you wish to lower your TTL.
  3. Click on Edit Zone File.
  4. Click on the Lower TTL Value button.

If DNS is handled by a third-party
The steps to do this with a third-party DNS provider can vary. Consult with the DNS provider you use with your domains if you need assistance with finding out how to do this. Given the broad range of interfaces and DNS providers out there, this article will not cover how to do this with a third-party DNS Service.

Databases

Your databases need to move along with your website content. Many modern applications utilize a database. If you ever installed one of our 1-click Applications, you must remember to back up your databases. If you use any pre-made applications beyond our 1-click offerings, then you most likely have a database that you use too. Fortunately, it's really easy to determine if you have any databases that need moving.

  1. Log into your AccountCenter.
  2. Select your current hosting service.
  3. Select Manage Databases.

If you have any databases, they will be listed on this screen:
1654_database_list

Of course, just because there is a database listed here doesn't mean it is in use by the website you are moving. You'll need to determine which databases are necessary to move.

Once you have figured out which databases you need to move, you can proceed to Export and import MySQL databases, transfer it to the new server, create database, and then import it.

Updating connection strings

On the new server, you will need to update the database connection strings for any applications that use the database(s) you migrated. Depending on the application, this will reside in different files. Typically, running the following SSH command in the html directory of your example.com folder (on the new server) will give you a list of all files referencing a database connection string:


grep -rl "internal-db.s00000.gridserver.com" *

Where internal-db.s00000.gridserver.com is the site number for the current server. Once you find the file, update the site number in the internal-db line to be that of the new server.

Cron Jobs

If you have set up any cron jobs that need to run, make sure to replicate the jobs on the new server. We have an article that covers everything about cron jobs, we encourage you to read: Using Cron.

SSL Certificate

If you are using an SSL certificate with your hosting service and it is used by the domain you're moving, make sure to grab this from the current server and import it to the new one. To do this, you'll need to follow these steps:

  1. Log into your AccountCenter.
  2. Select your current hosting service.
  3. Select SSL Certificates.
  4. Copy the 'RSA' private key and 'Certificate' key to a text editor on your local computer.

    You must copy the entire key, from the top '------BEGIN------' to the bottom '------END------' headings.

You can follow this article Moving an SSL Certificate from another server for steps on importing the certificate to the new server.

Email users

If you have any email users for the domain you're moving, you will need to re-create these mailboxes on the new server.

NOTE:

If the domain exists on the old server and you are not yet ready to move DNS, you will not be able to create domain specific email users. The email users added to the new server would all have to be user@all domains.

First, determine if you have any email accounts that need moving:

  1. Log into your AccountCenter.
  2. Select your current hosting service.
  3. Navigate to the Email Users section:
    1654_add_email_users
  4. Make note of any email users you may have that would need to move. You will need to re-create each email account one at a time and move the email box contents to it (if you are using IMAP).

The steps involved in moving a given email user can vary depending on your usage:

  • If you use POP3, all you will need to do after this is update the email settings in your client to connect to the new server.
  • If you use IMAP, this process can be a bit more tricky as you will need to move all of your emails to the new server. What this basically entails is configuring both the current and new email accounts in your favorite IMAP email client, selecting the messages you wish to move and then copying these to a folder on the new email account. Depending on how many emails you have and the speed of your internet connection, the time for this step to complete can vary.

Please see Creating a POP/IMAP email account for instructions on how to create an email user, which you will need to do on the new server.

Email aliases

Email aliases are a bit easier to move than email accounts, as there is nothing that needs to be done other than re-creating the alias. First, determine which email aliases need moving:

  1. Log into your AccountCenter.
  2. Select your current hosting service.
  3. Go to the Email Aliases section
    1654_add_email_aliases
  4. Make note of any email aliases you may have that would need to move. You will need to re-create each email alias one at a time on the new server.

For steps on creating an email alias, please see Creating an email alias/forwarder.

MySQL GridContainer

If you are using a MySQL GridContainer with your current server and wish to have one on the new server, you'll need to activate this from the AccountCenter. You can do this at any time, either before moving your databases or after. Due to the way MySQL GridContainers work, you can add them at any time. You will not need to "re-migrate" your databases manually if you elect to add the MySQL GridContainer afterward.

More information about MySQL GridContainers can be found in our Getting started with your MySQL GridContainer article.

Testing Time

Test using your Access Domain

Every Grid includes a unique access domain which can be used to view your websites before you switch your DNS. It will look something like this: s00000.gridserver.com where 00000 is used as an example and would be replaced by the unique site number of your Grid. The site number is available in your AccountCenter and Service Activation Letter.

Some examples uses are:
Previewing your primary domain: http://s00000.gridserver.com
Previewing a sub-domain or alternate domain: http://sub.mt-example.com.s00000.gridserver.com

Power Users: There is a more advanced method of previewing your sites before switching DNS which involves making a configuration change on your local computer to resolve your domain to your Grid. We have created this article which explains the process in detail.

Ready to switch

At this point, you've probably done a lot of fancy commands, clicked, dragged, copied and pasted, and updated many things. These are all things you've done in preparation of the switch-over to the new server. So, go back to your check list that you made at the beginning of your migration and verify you've taken care of all the important things.

Have you:

  • Moved your website content?
  • Moved your databases?
  • Re-created your email users?
  • Previewed your site?

If you think you're ready to go, please wait at least 24 hours before changing the DNS Zone File. To learn more about DNS, please see: DNS Explained.

If you are moving the domain to another server on the same account

Review this article and make it happen: Using the Point to Another Server tool.

If you are moving the domain to another server on another account

If you added the domain through the "Domains" tab, you will need to remove the domain entry in the AccountCenter. Click on the domain itself, then choose "Remove Domain Entry."

1654_remove_domain_entry 

Account A.

  • Select your domain from the Domains drop-down menu.
  • Click on Remove Zone File to remove the zone file from Account A.
  • Log out of the AccountCenter for Account A.
  • Sign into the AccountCenter for Account B.
  • Click on the Domains tab and click on Add New Domain or Service.

    1654_add_new_dom

  • Under Add Domains, click the Add Domain button.

    1654_add_domain_name

  • Type in your domain name. Do not use any of the following subdomains: www, ftp, email.
  • Now select your server of choice, then click on Next Step.
  • You'll now be returned to the "Overview" page of the AccountCenter. Your domain is listed under your selected server.
  • Verify

    Let your users know you've moved servers! This will not only show that you communicate with your visitors, but also serves as a great way to have more than yourself on the lookout for any odd side-effects of the entire moving process. Make sure all of your links work, that none of your email addresses are bouncing, and that nothing seems out of place. Keep your TTL lowered in case you need to switch the site back.

    At this point, you should have your websites working off of the new server that you set up and migrated everything to. If you embarked on this mission to move ALL of your sites to the new server, then you should wait a few days for things to settle down. Once you're sure you don't need the old server anymore, remember to close that service.