IIS 7 was developed to overcome the shortcoming of IIS 6. New features were added with the release of IIS 7. You can easily migrate your website from IIS 6 to IIS 7 to experience the new technology and become faster & efficient.
This guide will explain how you can migrate your website (configuration settings, content & certifications) from IIS 6 to IIS 7 using a Web Deployment Tool.
Prerequisites
- Web Deployment Tool
- Website in IIS 6 server
- Target IIS 7 server
- Installation dependencies
Step 1:
Before initiating the migration process,
. To check this, run the command below in the web deployment tool
msdeploy -verb:getDependencies -source:metakey=lm/w3svc/1
The value 1 represents the default website
Review the output and look for any scripts or components that are currently used by the site. If the site uses Windows authentication, then it will show <dependecy name= “WindowsAuthentication†/>
Step 2:
If you had Windows Authentication & ASP.NET installed on the source server, you need to make sure that these components are present in the destination server too.
If the dependencies and components are not the same, then the migration will not complete. You can remove unwanted components or dependencies from the XML file in the backup directory.
Step 3:
Now, you are ready to migrate your website from IIS 6 to IIS 7.
. It will help to restore to the initial state of the server if the migration fails for an unknown reason.
To create a backup of the destination server, run the following command in the Web Deploy tool.
%windir%system32inetsrvappcmd add backup "PreMsDeploy"
After setting up a backup, you can compress it to an archive using the command below
msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:archivedir=c:mysitearchive
Now, You can validate the effect of a migration by executing the command on the destination server.
msdeploy -verb:migrate -source:archivedir=c:mysitearchive -dest:metakey=lm/w3svc/1 -whatif> msdeploymigrate.log
Step 4:
msdeploy -verb:sync -source:package=c:mysitearchive -dest:metakey=lm/w3svc/1 > WebDeploySync.log
This concludes the migration of the website from IIS 6 to IIS 7. Some components like PHP, AJAX, ASP.NET needs to be configured after the migration independently by matching the configuration from the source IIS 6 server.
Conclusion:
In this guide, you learned how to successfully migrate a website from IIS 6 to IIS 7 by reviewing the dependencies, configuring the destination IIS server and using a Web Deployment tool.
Check out these top 3 Windows hosting services:
- Looking for the best windows hosting? Click this link and check all our recommendations.