How to migrate umbraco version 8 to umbraco version 9 (9.5.0)

Over the last few weeks we have been working on the latest Umbraco updates. Being Umbraco developers we wanted to ensure that we understood the implications, limits and expectations so that we could manage our clients sites and expectations.

Umbraco version 8 was built on the asp.net framework whereas Umbraco version 9 has been built on the .net core framework. This means a direct upgrade was not possible.

The approach

We started with a brand new blank Umbraco 9 website and migrated all the parts of the Umbraco 8 site piece by piece.

Step by step

Install a new blank Umbraco 9.0 website

  • We installed a new blank Umbraco 9.0 website (any newer version has issues with logins). This can also be upgraded to the latest Umbraco version 9 build later in the process (in my case 9.5.0). 
  • We Made a copy of the current Umbraco 8 database
  • We Updated the new blank Umbraco 9 websites’ connection string to use the copy of the Umbraco 8 database

Upgrade Umbraco 8 database to Umbraco 9

  • We Built and ran the new Umbraco 9 website. This forced the database to upgrade script to start and attempt to update the copied Umbraco 8 database to Umbraco 9
    • In my experience this Umbraco database upgrade process was far from perfect, failing a number of times during the upgrade
    • Generally the issues seemed to be the upgrade utility, when it couldn’t find one or more specific database schema elements (such as foreign keys) in the version 8 database
    • We worked around this by installing a separate clean Umbraco version 9 website and copying any missing schema elements from this (the error messages shown during the upgrade process told us what is missing if an error was generated)

Migrate Views

  • We copied the home page view template and it’s ancestors from the Umbraco version 8 site to the Umbraco version 9 site and tried to load the page, it kept failing as many of the Umbraco references had changed
    • To begin, we commented out all but the first error, then resolved this and the remaining errors one by one, referencing the Umbraco documentation for the updated syntax
  • We repeated the above for every page view template in the site
    • This was to be a lengthy process

Styles & Scripts

  • The built in asp.net bundler did not exist in .net core and was replaced by the ‘bundleconfig.json’ file, (see online for how to use this)

Configuration

  • The main configuration file for the site is now the ‘appsettings.json’ and this now contains all custom site settings currently located in the ‘web.config’ of the version 8 site
  • A ‘web.config’ site may still be required if the site is hosted on IIS and should contain IIS specific information only.

Plugins

  • All plugins used in the Umbraco version 8 site needed to be installed using the Umbraco version 9 version (where they existed) or was suitable alternative found.
  • They then needed to be configured to work as required

Let's work together

Contact us on 01202 800994 or send an email to [email protected].

NAME
EMAIL
MESSAGE

By continuing to use this site you agree to use cookies as outlined in our privacy and cookie policy