Moving an Umbraco Website to Windows Azure Websites
04 Sep 2013
Dan Lister
Migrating an Umbraco site to Windows Azure is a pretty painless experience. You don't really need to use any other tools or services other than Windows Azure Websites and Bitbucket or Github. We've found that you should be able to run any version of Umbraco without facing any problems. We've tried and tested running version 4.11, up to the latest version 6.1.5. We've outlined a couple of caveats for you to be aware of too. If you have a local Umbraco instance, then the following steps might be useful to migrate an existing site.
Add a clustered index to the User Logins table
You can find more information about this step on Code Cloudy's site. SQL Azure doesn't like tables without clustered indexes. We think this has something to do with being unable to replicate/distribute tables without indexes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| CREATE CLUSTERED INDEX umbracoUserLogins_Index ON umbracoUserLogins (contextID) |
view raw create-user-logins-index.sql hosted with ❤ by GitHub
Move the database via SQL Server Management Studio
If you have an existing SQL Azure server instance then you can use the 'Export Data-tier application' option via SQL Server Management Studio 2012 to create a local backup of the database.
Once backed up, connect to the SQL Azure server instance and use the 'Import Data-tier application' option. This will add the new database to the SQL Azure instance. It's as painless as entering the server location, specifying a new database name and clicking export.
Create a new website in Azure
A new, quick website will do. You might want to link the database resource to the web site at this point.
Update config
The only config setting to update is the database connection string. You'll be able to find the connection string from the database section within Windows Azure. Connecting to a SQL Azure database is pretty much the same as any other database or database server.
Deploy site files
You can either copy all your files to the site via FTP or use Windows Azure's automated code deployments. We prefer the latter as Azure will build the application before deploying. We use Bitbucket to host our repositories. Bitbucket has been integrated into Azure's deployment section within Azure Websites. This makes it easier to deploy straight from source when pushing to specific branches.
That's pretty much it. The only caveat is handling media files can be a little tricky. As long as you don't have any in source control or at least, a reference to the media folder within your solution, Azure's deployment will not overwrite your existing media items. Using Azure Storage would be a better solution but we've found it be a little tricky when scaling Azure Websites to multiple instances.
Disqus Comments
We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
G
Join the discussion…
Comment
Log in with
or sign up with Disqus or pick a name
Disqus is a discussion network
- Don't be a jerk or do anything illegal. Everything is easier that way.
Read full terms and conditions
This comment platform is hosted by Disqus, Inc. I authorize Disqus and its affiliates to:
- Use, sell, and share my information to enable me to use its comment services and for marketing purposes, including cross-context behavioral advertising, as described in our Terms of Service and Privacy Policy, including supplementing that information with other data about me, such as my browsing and location data.
- Contact me or enable others to contact me by email with offers for goods or services
- Process any sensitive personal information that I submit in a comment. See our Privacy Policy for more information
Acknowledge I am 18 or older
I'd rather post as a guest
Discussion Favorited!
Favoriting means this is a discussion worth sharing. It gets shared to your followers' Disqus feeds, and gives the creator kudos!
Tweet this discussion
- Share this discussion on Facebook
- Share this discussion via email
- Copy link to discussion
T
Do you have a SQL Server in a Virtual Machine so you can host multiple databases for each client or do you use Azure SQL databases for each client
see more
Hi Tom. I use a SQL Azure Server rather than a SQL Server instance on a VM. That way I can still create multiple databases for clients.
see more
What about moving the SQL data? I thought the BACPAC only contains the schema?
Edit: My mistake, you did Export rather than Extract.
see more
Hi Dave. A BACPAC file should contain data too. The below is a snippet taken from http://msdn.microsoft.com/e...
"A BACPAC contains both schema and data, but does not support being imported to a database project for schema modification. The primary use of a BACPAC is to move a database from one database service to another."
see more
live.rezync.com
live.rezync.com is blocked
This page has been blocked by an extension
- Try disabling your extensions.
ERR_BLOCKED_BY_CLIENT
Reload
This page has been blocked by an extension
pippio.com
pippio.com is blocked
This page has been blocked by an extension
- Try disabling your extensions.
ERR_BLOCKED_BY_CLIENT
Reload
This page has been blocked by an extension