Migrate from Umbraco 8 to Umbraco 10
This article provides steps on how to migrate a project from Umbraco 8 to Umbraco 10.
Since the underlying framework going from Umbraco 8 to Umbraco 10 has changed, there is no direct upgrade path. That said, it is possible to re-use the database from your Umbraco 8 project on your new project in order to maintain the content.
It is not possible to migrate the custom code as the underlying web framework has been updated from ASP.NET to ASP.NET Core. All templates and custom code will need to be reimplemented.
You also need to make sure that the packages that you are using are available on the latest version.
Prerequisites
A Umbraco 8 project running the latest version of Umbraco 8, either on Umbraco Cloud or local.
A local Umbraco 10 project.
A backup of your Umbraco 8 project database, or direct access to it if the project is local.
Video Tutorial
Step 1: Content Migration
Obtain the Umbraco 8 database:
If your Umbraco 8 project is on Umbraco Cloud, create a backup using the database backup guide. Alternatively, you can clone the environment down and take a backup of the local Database after restoring. Make sure to restore both content and media from your Cloud environment after cloning it down.
If your Umbraco 8 project is local, you already have direct access to its database. Skip ahead to point 3 below (setting up the local Umbraco 10 project).
Import the database backup into SQL Server Management Studio.
Set up a new local Umbraco 10 project using the Umbraco.Templates NuGet package:
Test the project and make sure to log in to the backoffice.
Update the connection string in the Umbraco 10 projects
appsettings.jsonfile so that it connects to the Umbraco 8 database:
Enable Unattended Upgrades to authorize the database upgrade.
Run the project and login to authorize the upgrade.
Select "Continue" when the upgrade wizard appears.
After it has finished upgrading, stop the site and disable the unattended upgrade.
Run the site and log in using Umbraco ID to verify if your project has been upgraded to the new version.
Step 2: File Migration
Copy the following files/folders from the Umbraco 8 project into the Umbraco 10 project folder:
~/Views- Do not overwrite the default Macro and Partial View Macro files unless changes have been made to these.Any files/folders related to Stylesheets and JavaScript.
Copy the
~/Mediafolder from the Umbraco 8 project into thewwwroot/mediafolder of the Umbraco 10 project:If your Umbraco 8 project is on Umbraco Cloud, connect to Azure Storage Explorer from the Umbraco 8 project and download the media folder.
If your Umbraco 8 project is local, copy its local
~/Mediafolder directly.
Migrate custom configuration from the Umbraco 8 configuration files (
.config) into theappsettings.jsonfile on the Umbraco 10 project.As of Umbraco version 9, the configuration no longer lives in the
Web.Configfile and has been replaced by theappsettings.jsonfile.
Migrate Umbraco Forms data to the database, if relevant.
As of Umbraco Forms version 9, it is only possible to store Forms data in the database. If Umbraco Forms was used on the Umbraco 8 project, the files need to be migrated to the database.
Run the Umbraco 10 project.
It will give you an error screen on the frontend as none of the Template files have been updated. Follow Step 3 to resolve the errors.
Step 3: Custom Code in Umbraco 10
Umbraco 10 is different from Umbraco 8 in many ways. With all the files and data migrated, it is now time to rewrite and re-implement all custom code and templates.
Examples of changes
One of the changes is how published content is rendered through Template files. Due to this, it will be necessary to update all the Template files (.cshtml) to reflect these changes.
Read more about these changes in the IPublishedContent section of the Umbraco CMS documentation.
Template files need to inherit from
Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>instead ofUmbraco.Web.Mvc.UmbracoViewPage<ContentModels.HomePage>Template files need to use
ContentModels = Umbraco.Cms.Web.Common.PublishedModelsinstead ofContentModels = Umbraco.Web.PublishedModels
Depending on the extent of the project and the amount of custom code and implementations, this step is going to require a lot of work.
Continuing after the migration
At this point, the project runs on Umbraco 10 locally. Umbraco 10 is no longer a supported version, and Umbraco Cloud only allows new projects to be created on versions within their active support phase.
Continue upgrading the project locally, one major version at a time. Follow the Major Upgrades guide, until it reaches a version Umbraco Cloud can currently create a project on. See the Long-Term Support and End-of-Life page for which versions are currently available.
Related Information
Last updated
Was this helpful?