With the upcoming End-of-Life (EOL) phase for Umbraco 7 in September 2023; we have been working with our clients to upgrade/migrate their websites with the main objective to move to Umbraco 8 or Umbraco 10 budget/timescale depending.
Umbraco 10 is classified under the Long-term Support (LTS) release type by Umbraco HQ and as a result, means upgrading to later versions is not as complex as the underlying technology remains the same (.NET Core).
A question we get asked a lot is will my Umbraco 7 website still work?
And the answer is yes it will!
However, End-of-Life means that Umbraco HQ will no longer work on and maintain features, and will no longer release fixes for bugs, regressions or security issues. The EOL phase is the last stage in the life cycle of an Umbraco product. This is why it is really important to upgrade your website!
When upgrading an Umbraco website, the prerequisite is to get the website to the latest minor version of Umbraco (that the website is on) before going any further. Therefore, before we start anything, our very first task is to upgrade the website to the latest version of Umbraco 7!
We split an Umbraco upgrade project into three parts; a planning phase, upgrading the database phase and upgrading the code phase:
One of the initial considerations is to ascertain which packages (or plugins) are not compatible between versions. Therefore, the first step before anything is done, is to do an audit of the website. This would be to gather the information for all of the datatypes and packages which are used by the website to identify any that are custom built or using deprecated packages. Once a list has been made, we would typically go through an exercise to find a suitable replacement or upgrade:
For example, the following packages were candidates to be upgraded:
Terratype (https://our.umbraco.com/packages/backoffice-extensions/terratype/) ==> Our.Umbraco.GMaps (https://our.umbraco.com/packages/backoffice-extensions/ourumbracogmaps-google-maps-for-umbraco-8-umbraco-9/)
It’s important to not rush the planning phase so that you can get a full picture of what’s required!
The database (upgrading from Umbraco 7 to Umbraco 8)
Once the planning phase is complete, the next thing to do is download a copy of the live website’s database and media. This ensures that the content and media that we’re dealing with is the most up to date and the upgrade is done as a real test!
Before we begin upgrading the website’s database, we cleanse it. This is so that the database is free from any old data that isn’t required. As well as good housekeeping, this also reduces the time taken to upgrade the database. Did you know that every time that you save (not even publish!) a page in Umbraco, a version is stored in the database? This means that over time, the database can get really large with gigabytes of data (not to mention the database schema changing between Umbraco versions). Therefore, the cleansing of the database is an important step.
The tasks that we carry out to cleanse the database are:
- Empty the content and the media recycle bins from within Umbraco
- Run SQL queries to (properly) empty the recycle bins
- Install Unversion (https://our.umbraco.com/packages/website-utilities/unversion/) and remove any previous versions of pages
- Run SQL queries to cull any stored previous version of Umbraco
Once we have done the above, we run pre migration health checks using this package https://our.umbraco.com/packages/developer-tools/pre-migration-health-checks/. This helps to identify any potential problems which may prevent the database being migrated.
During a recent upgrade, we noticed during the cleansing of the data, that the database contained emojis. This does not work with the automated database migrations that run during the upgrade wizard. The reason for the emojis is that some editors had logged into Umbraco on their smartphone and added emojis amongst the content that they were writing. So we had to find the emojis in the website using SQL queries which provided the node ID and remove them from the content within Umbraco.
During this phase, using the list we made (during the planning phase) to identify deprecated packages, we would convert the code to use the newer alternative package. In some cases, the data that was stored needed to be manipulated too so that the format works with the newer package.
At this point, the database is ready to be migrated! To do this, we install a blank Umbraco version 8 instance with an empty database. We do this via Nuget and go through the Umbraco installation wizard. This ensures that all of the Umbraco version 8 code is in place. We then update the connection string of the blank version 8 website to version 7 database that we have previously cleansed. Running the version 8 website will now run the database through the necessary Umbraco migrations to update the schema and data to the Umbraco version 8 format. This can take some time, so might be a time to hit go and grab a coffee! Eventually you will be redirected to the Umbraco back office where you will see your version 7 content within Umbraco version 8. Once you’re here, we would recommend testing the content extensively to ensure that it has all been migrated successfully. Common issues are checking links within pickers, links within rich text editors, media items and links within Nested Content.
The database (upgrading Umbraco 7 to Umbraco 10)
If we are upgrading the database to Umbraco 10, we would migrate the content and media using a combination of uSync Content (https://our.umbraco.com/packages/developer-tools/usynccontentedition/) and uSync Migrations. This would be using uSync Content to export the content and media from the existing site and then uSync Migrations to transform the format of the data to work with Umbraco 10. This would be done by installing a new blank instance of Umbraco 10 and using uSync Migrations to import the existing content.
The code (converting Umbraco 7 to Umbraco 8)
Once the database has been migrated, we’re ready to start making changes to the code base! So we go about upgrading Nuget packages, of course including Umbraco, to version 8 compatible versions. Once you have done this and attempted to build the solution in Visual Studio you will definitely see some compilation errors. So it is a case of updating code to be in Umbraco version 8 format so the project builds.
Once your project builds it will be a case of updating the code that is used by Umbraco templates. This would mean going through each Umbraco template and associated code and converting anything into the Umbraco 8 code. In order to make sure everything works, there would need to be regression testing applied at each change to make sure a bug hasn’t crept in and to ensure that all pages work as they should.
Once all the code has been changed and is working in Umbraco 8 – it is ready to be handed over to the client for user acceptance testing.
The code (converting Umbraco 7 to Umbraco 10)
Once the blank instance of Umbraco 10 contains all the content/media from the previous website it’s time to make changes to the code base.
As this needs to be ASP.NET Core, the code changes required are considerable in order to work with the new framework. Not only would there be Umbraco template changes, but wholesale C# class / controller changes would be required too.
As .NET Core is built on a middleware architecture, it is likely that a number of modular components would need to be written and hooked into the website’s startup class in order to work with the previous website.
Go live day!
Once the upgrade has passed QA and user acceptance testing it is time to deploy your upgraded website to the live environment! Before we deploy the upgraded source code we need to get a fresh copy of the website’s live database. We then repeat the database upgrade steps detailed above, and do some final testing before deploying both the source code and database to live.
As you can see from the steps above, an Umbraco upgrade is not to be taken lightly and there are a lot of considerations and work involved! Brace Digital have carried out many upgrades for our clients and are continuing to do more in preparation for the upcoming EOL phase for Umbraco 7. So if you have a website which requires upgrading, please get in touch with us below to see how we could help you.
To discuss your website development requirements, fill in this contact form and a member of our team will get back to you shortly.