Migrate from Umbraco 7 to Umbraco 8 on Umbraco Cloud
This article will provide detailed steps on how to migrate a Umbraco 7 Cloud project to Umbraco 8.
Taking your Umbraco CMS project from Umbraco 7 to 8 is called a migration as it requires that the data is migrated in the process. This article covers each step involved in this process.
- A Umbraco 7 Cloud project running the latest version of Umbraco 7.
- A clean Cloud project running the latest version of Umbraco 8 with at least 2 environments.
We strongly recommend having at least 2 environments on the Umbraco 8 project.
Should something fail during the migration, the Development environment can always be removed and re-added in order to start over on a clean slate.
- 1.Clone down the Umbraco 7 Cloud project.
- 2.Run the project locally and restore Content and Media.
- 3.Clone down the Development environment from the Umbraco 8 Cloud project.
We recommend setting up the Umbraco 8 Cloud portal locally in Visual Studio.
To use the cloning tool, place it and run it in the local directory you want to clone the Cloud project into.
~/App_Data/Umbraco.mdffrom the cloned Umbraco 7 project.
- 6.Paste the file into
~/App_Dataon the clone of the Umbraco 8 project.
web.configfrom the Umbraco 8 project.
- 8.Locate the
- 9.Replace the value with the version your Umbraco 7 project is running.
- 10.Run the Umbraco 8 project locally
- 11.Authorize the migration - Cloud credentials are used for this.
- 12.Click Continue to start the migration.
- 13.Log in to the backoffice and verify that everything is there once the migration is complete.
If your login does not work, try the following approach:
UsersMembershipProviderattributes from your Umbraco 7
web.configfile to the Umbraco 8
web.configfile. Once you've done this, try to login again.
Below is an example of how the attribute can look:
Please be aware that this is only a content migration.
The database will be migrated, but updating view files, custom code, and implementation is a manual process.
Before moving on to the next step, make sure that the Umbraco 8 project is no longer running.
The following files/folders need to be copied into the Umbraco 8 project:
~/Views- do not overwrite the default Macro and Partial View Macro files, unless changes have been made to these.
- Any custom files/folders the Umbraco 7 project uses, that aren't in the
~/App_Data/UmbracoForms- in the case Umbraco Forms was used on the Umbraco 7 site.
Merge the configuration files carefully to ensure any custom settings are migrated while none of the default configurations for Umbraco 8 is overwritten.
- 1.Run the Umbraco 8 project locally
- It will give you an error on the frontend as none of the Template files have been updated yet.
- 2.Open the command line tool in the
~/datafolder on the Umbraco 8 project.
- 3.Generate UDA files by running the following command:
echo > deploy-export.
- Once a
deploy-completemarker is added to the
~/datafolder, it is done.
~/data/revisionto ensure all the UDA files have been generated.
echo > deployin the
~/datafolder to make sure everything checks out with the UDA files that were generated.
echo > deploycommand will generate a new marker. Move forward with the migration based on the marker:
- Something failed during the check
echo > deploy-clearsignaturesfollowed by
echo > deployto clear up the error
- Everything checks out: Move on to the next step
Umbraco 8 is different from Umbraco 7 in many ways. This means that in this step, all custom code, controllers, and models need to be reviewed and rewritten for Umbraco 8.
One of the changes made, is how published content is rendered through Template files. Due to this, it will be necessary to update all Template files (
.cshtml) to reflect these changes.
- Template files need to inherit from
- Template files need to use
ContentModels = Umbraco.Web.PublishedModelsinstead of
ContentModels = Umbraco.Web.PublishedContentModels.
Depending on the size of the project and the amount of custom code and implementations, this step is going to require a lot of work.
Once the Umbraco 8 project runs without errors on the local setup, the next step is to deploy and test on the Cloud Development environment.
- 1.Push the migration and changes to the Umbraco Cloud Development environment
The deployment might take a bit longer than normal.
To track the process, keep an eye on the deploy markers in
- 2.Progress through the steps based on the deployment result:
echo > deploy-clearsignaturesfollowed by
echo > deployto clear up the error.
deploy-complete: The Development environment has been upgraded.
- 3.Transfer Content and Media from the local clone to the Development environment.
- 4.Test everything on the Development environment.
- 5.Deploy to the Live environment.
Once the migration is complete, and the Live environment is running without errors, the site is almost ready for launch.
- 1.Setup rewrites on the Umbraco 8 site.
- 2.Assign hostnames to the project.
- Hostnames are unique, and can only be added to one Cloud project at a time.