Migrate: Media Temple Grid Server to Dedicated Virtual

The migration from Media Temple’s Grid Server to the Dedicated Virtual web hosting solution was surprisingly easy. With initial pointers from Paul, I was well on my way to successfully migrating four hosted sites from the "Grid" to the DV. Media Temple’s Dedicated Virtual hosting plans provide a considerable amount of flexibility – including root access – which is ideal for users who want complete control of their own or client(s) websites.

Unfortunately, the (mt) Knowledge Base is a little thin and may not be of much help for those that may feel disoriented or overwhelmed by the task of moving from the Grid Server to a Dedicated Virtual. I know I was. Fortunately, with a little trial and error, reading, and a successful migration, the following was documented in hopes of helping others who plan on making the move. Much praise for Plesk – the control panel software of choice provided for Media Temple customers.

For the following example, we’ll move an entire WordPress driven site from the Grid to the DV. We’ll take this opportunity to install a fresh new install of WordPress. The beauty of moving to a completely different server is that a) you have an opportunity to start afresh, and b) you can tweak and prepare your site before DNS changes are made (any and all improvements that you’ve pushed back due to procrastination or sheer laziness can finally be completed).

The general intent of this tutorial is to serve as a reference for any website owners anticipating a move from a current hosting solution to a second, third, or fourth.

Check-list: What do I need to do?

  • Export your WordPress database using phpMyAdmin [#]
  • Download important files and directories – .htaccess, wp-config.php, /wp-content/uploads, /wp-content/plugins, and /wp-content/themes [#]
  • Upload a new WordPress installation into your new server httpdocs directory [#]
  • Create database to match wp-config.php settings or start new [#]
  • Upload important files and directories – .htaccess, wp-config.php, /wp-content/uploads, /wp-content/plugins, and /wp-content/themes [#]
  • Import old WordPress database via SSH [#]
  • Double-check website before requesting DNS change [#]
  • If everything checks out as it should, decide what hours generate the least amount of traffic and request DNS change to match [#]

Export your WordPress database

MySQL Admin - Media Temple WebControl

In order to successfully move your WordPress posts, comments, and configuration settings, you’ll need to export your existing database (SQL). This can be done using the phpMyAdmin interface accessed via the Grid Server Account Server WebControl > MySQL Admin.

phpMyAdmin - Export tab

Once inside phpMyAdmin, locate the Database drop down menu and select the associated WordPress database for export. In the following view, find the ‘Export’ tab.

phpMyAdmin - Export web interface

Within the ‘View dump (schema) of database’ view, ensure that the following parameters match:

  • Export – If this database is used for nothing other than your WordPress installation, click the ‘Select All’ option which will highlight all WordPress related tables preceded with “wp_”. Ensure that the SQL radio button is ticked.
  • SQL Options > Structure – Ensure that the following and nothing else are selected: ‘Structure’, ‘Add DROP TABLE’, ‘Add AUTO_INCREMENT value’, and ‘Enclose table and field names with backquotes’.
  • SQL Options > Date – Ensure that the ‘Data’ box is checked. Also check ‘Complete Inserts’ and ‘Use hexidecimal for binary fields’.
  • Scroll down and check the ‘Save as file’ box. Leave the default file name template and compression settings and click the ‘Go’ button. phpMyAdmin will then prompt you to save a backup of your database. Do so and move to SQL file to a safe directory on your computer.

You have successfully backed-up your entire WordPress “core” – settings, configurations, users, categories, links, posts, and comments. For future reference, repeat the above steps in order to backup your installation of WordPress on a regular schedule.

Download important files and directories

Unless you have spent a considerable amount of time customizing core WordPress files, I think it is [generally] a good idea to take this opportunity (of moving to a new server) to install the latest distributions. Considering it is safe to assume that you have uploaded countless images and files for sharing to your exhsiting server, it would only make sense to move specific files or folders to the new. In order to do so, you’ll need to fire up your favorite FTP utility in order to download files locally to your computer.

Aside from whatever personal files or directories you have created that you wish to bring with you, I recommend that users quadruple check that they’ve saved the following:

  • .htaccess – This file is hidden by default. In order to copy the contents of this file – rewrite or redirect rules – you’ll need to show invisible files. Most FTP utilities offer the option under their ‘View’ menu option.
  • wp-config.php – This file contains the important bits of your installation including your database name, location, username, and password. If you plan on creating your new database to match the settings found in this file, save a local copy of this file to upload back into your WordPress directory.
  • /wp-content/uploads – Extremely important directory! Any files or images that you have uploaded using the WordPress uploading interface (post editor) are stored in this directory. Forget to move this and you’ll discover all your images for posts (after database import) will be missing.
  • /wp-content/plugins – Personally, I download my entire plugins folder to re-upload. If my site is working as it should with the existing plugins, why leave them out of the download / re-upload workflow when moving to a new host? Once you’ve imported yoru backup database, your WordPress install will look as it did on the previous host. If plugins are missing from the new installation, your site might not function as it should from the get-go.
  • /wp-content/themes – The presentations folder for WordPress containing all the themes you’ve amassed over the years.

Upload a new WordPress installation

Download the latest release of WordPress from the Download page. The current release as of this posting is version 2.1 which offers a handful of updates from previous versions. Check out the release notes here.

Downloaded WordPress directory

Remember when we downloaded all the important files and folders from the previous step? Drop them back into this new WordPress download in preparation for upload. Ensure that wp-config.php remains in the root directory while plugins, uploads, and themes are placed in the wp-content directory. Once all the files are where they should be, open your FTP utility and upload the files and directories to your new server.

Create your WordPress database

The first few minutes after logging into Plesk may be somewhat overwhelming. Worry not as Plesk is far simpler to navigate and use than you would ever imagine. By moving forward with the creation of your new WordPress database, we’re going to assume that you’ve familiarized yourself enough to understand the relationship of “Clients” and associated “Domains”. Moving forward, open the domain for which WordPress is to be installed. You’ll want to look for the “Services” section of the page.

Plesk Services Options

Within the Services pane, select Databases. In the next view, select Add New Database. You will then provide the Database Name, ensure that type is MySQL, and make sure that Database Server is Local MySQL Server. Click OK. After the database is created, you’ll need to create an associated username and password. The database name, username, and password will then need to be referenced in the wp-config.php file located in your WordPress root directory to be uploaded to the new server.

Upload important files and directories

All of the previously downloaded files & directories including the newly edited wp-config.php file should then be uploaded to your new server. Take note to ensure that the original WordPress file directories are as they should be /wp-content/uploads, /wp-content/plugins, and /wp-content/themes.

Import old database via SSH

Chances are high that your database backup exceeds the 2MB upload limitation of phpMyAdmin. Fortunately, the database can still be upload – with a bit more finger work. You’ll need to complete the import via SSH (Secure Shell). In order to do this, your backup must be on your server. Upload your database into the root directory of your domain and open a command line utility. OS X users can open Terminal. Type the following to open an SSH session and hit [enter]. You will be prompted to enter your SSH/FTP password:

$ ssh username@domain.com

Where username is your SSH username and domain is the associated domain that you wish to import an existing database into. Most likely will need to be an IP due to your domain not receiving the DNS change. Once logged in, you’ll need to navigate to the directory where the backup database was uploaded. In this scenario, your root HTML directory. If you are unsure of the correct path, simply type the following followed by [enter]:

$ ls

ls is an abbreviation of list segments. Entering ls followed by [enter] will present you with a list of directories & files on your server. In the case of Dedicated Virtual users, cd or change directory where the backup exists:

$ cd httpdocs

Now that you are in the correct directory, you can import your WordPress backup into an existing [empty] database on your server:

$ mysql -u username -p databasename < backup.sql

Enter the string above and hit [enter] after which you will be prompted for the password for the existing database. Username refers to the username associated with the database, databasename the name of the existing database, and backup.sql being the backup uploaded via FTP from the old server. [More Info] Once the import is complete, logout and delete the backup from your HTML directory.

Double-check your website before requesting DNS change

Now is the time to double-check your import and installation to ensure that everything is in working order. Because your domain is not yet pointing towards your new host, you’ll need to navigate using the IP or by selecting the ‘Site Preview’ in Plesk. Now is also a great time to create your Mail aliases or accounts for forwarding or setup via Plesk in order to ensure that no emails are lost during the DNS change.

The best time to request a DNS change?

The best time of day to request an official DNS change from your host depends on your readership. Reference your statistics tracking package for a better idea of what hours net the least number of readers. Doing so will ensure that any downtime as your DNS resolves will not result in disoriented and / or confused readers. Recommended time for a DNS change would be between the hours of 2AM and 5AM. Your results may vary.

Discuss - 58 Comments

  1. Alex says:

    Thanks for the article Derek, I was actually planning on opening up an account with Media Temple for several of my ventures. Whatever I can get my hands on about the Media Temple services is great.

  2. Mike says:

    Does anyone know how to add a subdomain on mediatemple’s (dv)?

  3. Derek says:

    [quote comment=”44686″]Does anyone know how to add a subdomain on mediatemple’s (dv)?[/quote]

    Log into Plesk and navigate to the domain that you want to add the subdomain to. Under hosting for the domain, there is an option (button) for subdomain.

  4. Justin says:

    I’m trying to transfer my client’s site to DV, but I’m having some issues with the DNS. It seems as if Plesk only creates one DNS zone, but GoDaddy requires two. When I try adding on myself and using that, GoDaddy responds with an error… any ideas?

  5. Derek says:

    Justin, did you check the Knowledge Base for the DNS info. I registered domains through GoDaddy and have had no issues getting them pointed in the right direction.

  6. Peety says:

    I wonder if you can help me please. I just recently moved to DV with media temple from hosting (yahoo).. Yahoo had allowed me to add and install various applications into any subdmain however with plesk it is different. I am not sure what to do? Secondly, I would like to thank you for taking the time to write this article.


  7. Stuart Swan says:


    Assuming you’ve setup the subdomain, all you need to do is click on the chosen domain, then click on ‘Application Vault’ then click ‘Add New Application’ you will then be presented with a list of apps, before the list at the very top of the page is a dropdown menu labelled ‘Target Domain:’ which you can then select your subdomain from, check the radio button for the app you would like to install then click the ‘Install’ which is located beside the ‘Target Domain’ dropdown.

    Hope this helps. Oh, and I love the new site design Derek!

  8. Derek says:

    Brett, I’d drop a note as a support ticket to ask that question. I had a questions concerning an installation of Rails on DV 3.0 (which is what all new customers are on) and received a reply saying that the KB would be updated accordingly for DV 3.0 users. There may be some changes worth knowing about before proceeding.

  9. Brett says:

    Does anyone know how to update your (dv) to use .php instead of .php5 as detailed in this KB article: http://kb.mediatemple.net/article.php?id=260 ? There is a releated article for (dv) 2.0 but I am on 3.0 and did not know if that would effect anything specifically. I suppose that I could redo all my sites to use .php5 instead of .php but it seems a little silly to do things that way. Any advice?

  10. Brett says:

    [quote comment=”44897″]Brett, I’d drop a note as a support ticket to ask that question. I had a questions concerning an installation of Rails on DV 3.0 (which is what all new customers are on) and received a reply saying that the KB would be updated accordingly for DV 3.0 users. There may be some changes worth knowing about before proceeding.[/quote]

    Yeah I installed RoR last night according to their KB and it doesn’t appear to work. I guess I will aks about that as well.

  11. […] Nyttig informasjon fra en blogger som flyttet fra et webhotell til et annet: http://5thirtyone.com/archives/757 […]

  12. Ralph Dagza says:

    What do you recommend?

    Mosso? or DV?

  13. Derek says:

    Well, considering 5ThirtyOne has only been hosted on Dreamhost and Media Temple (GS and now DV), I’m going to have to say go DV. After taking a hit from Engadget, TUAW, Digg, and Apple Insider without the DV faltering, I think that sums confirms my belief in the DV 😉

  14. Mike says:

    Hey there – Having been on MT’s GS and DV for a while now, how would you compare MT to Mosso (I’m assuming you’d know, since you’re a co-author on the Mosso-hosted Uneasy Silence site =D)? By that, I mean what specifically have you noticed in terms of performance between the two providers?

  15. Derek says:

    Hey Mike, although I do occasionally post content on UNEASYsilence, I do not admin the servers. That would be Dan. These posts on UNEASY might be of interest to you.

  16. Gail says:

    Hi Derek! I’m planning to transfer to MT and get their DV service. I’m not a server admin though, so I’m getting a bit skeptical from getting it (the GS seems much easier). The sites we mostly run are WordPress, Drupal, osCommerce, or just plain static HTML. But the thing is, we’d like to be able to give our clients their own control panel (so yeah we’re kinda stuck on getting DV hehe). But in terms of traffic, I would say that only about three of our hosted sites fall under the 3000 uniques and they’re all WordPress sites.

    On the management side, is DV much trouble? I mean, have you experienced needing to reboot the server or anything like that? Right now we have a reseller account (I’m just totally displeased with their service that I want to move to MT), and I’m able to manage client accounts using a Web Host Manager. Would that be enough or would I need to hire a system admin?

    Have you experienced any hacker attacks? If that happens, who takes care of it, you or MT?

  17. Derek says:

    By making the move to DV, you should have a basic understanding of server maintenance. However, actions liking restarting your server or services can be done from Plesk. Regarding security breaches, MT does get involved. Although you should be able to restore your website from a manual or automated backup. MT offers snapshot backs for a monthly fee that can completely restore your server.

  18. Derek –

    You mind if I contact you outside of comments to chat with you about your DV experience? I’m on the fence about levels and would like to ask a real customer with similar needs a few clarifying questions…

  19. Derek says:

    Sure, feel free to email me any questions and I will do my best to answer.

  20. [quote comment=”106767″]Sure, feel free to email me any questions and I will do my best to answer.[/quote]
    Great – I appreciate it.