How do you migrate an IIS 7 site to another server?

Kalid picture Kalid · Jan 29, 2009 · Viewed 202.9k times · Source

I'm wondering what is the best practice for moving a website to another server (along with all settings, etc.)

  • Manually recreate the site on the new server (not maintainable for obvious reasons)
  • Copy the applicationHost.config settings file
  • Use appcmd to make a backup and restore
  • Use MSDeploy to publish the site on the new machine
  • Use a 3rd party tool

Just wondering what others' experiences have been.

Answer

chews picture chews · Jan 29, 2009

I'd say export your server config in IIS manager:

  1. In IIS manager, click the Server node
  2. Go to Shared Configuration under "Management"
  3. Click “Export Configuration”. (You can use a password if you are sending them across the internet, if you are just gonna move them via a USB key then don't sweat it.)
  4. Move these files to your new server

    administration.config
    applicationHost.config
    configEncKey.key 
    
  5. On the new server, go back to the “Shared Configuration” section and check “Enable shared configuration.” Enter the location in physical path to these files and apply them.

  6. It should prompt for the encryption password(if you set it) and reset IIS.

BAM! Go have a beer!