Recently I have started working on upgrading my client's Umbraco v7.15.4 website to Umbraco v8.6.3 (current latest version) and decided to write this blog as it can be very tricky and you might end up spending hours if not days to fix your problems. I'd be very happy if I can help you to save some time and do better planning before doing your upgrade.
Before you start doing anything, you should know that;
- Umbraco 8 is a major release. There will be a lot of breaking changes, for my case 435 new features, 95 breaking changes and 1254 issues & tasks.
- Please check the local development and hosting requirements, otherwise the upgrade will fail and you have to rollback your changes to try again.
- One important thing, please make sure you have done all your Visual Studio 2017 or 2019 upgrades first.
- Ensure that you have got .NET Framework 4.7.2 installed.
- Upgrade your v7 Umbraco project to 7.14+, latest v7 version would be your best option.
- Umbraco codebase has been fundamentally updated in Umbraco 8.
- A lot of legacy code has been completely removed.
- New APIs have been introduced as well as complete new Umbraco backoffice features.
- Some of the new major features include Infinite Editing, Content Apps and Language Variants.
- And finally and most importantly; according to this documentation, there is no direct upgrade path from Umbraco 7 to Umbraco 8.
I now know that there is no direct upgrade path from 7 to 8, but when I started working on my upgrade tasks, I didn't have this information (for some reason I couldn't see that information which is so obvious to me now.), and after reading Jon Jones's this article, I decided to follow his path, as my project also have a lot of custom code and a lot of Umbraco data.
First approach;
- Make sure you have got minimum system requirements.
- Make sure you have got all the code & db backups.
- Upgrade the UmbracoCms nuget package.
- Run Umbraco Installation Wizard to upgrade the database
After the UmbracoCms (and all dependant package) upgrade; I ended up commenting out many lines of code in my solution to just to be able to build the solution without any errors, so I could see the Umbraco Installation Wizard screen, but this wasn't easy as I saw all the problems that Jon Jones mentions in his post + some other problems, including the following ones (please click on them to see the answers that helped me to fix these problems)
- Located assembly's manifest definition does not match the assembly reference
- You must add a reference to assebly 'netstandard, Version=2.0.0.0'
- Could not load type 'Umbraco.Core.Configuration.UmbracoConfig' from assebly 'Umbraco.Core'
- This was related to ModelsBuilder, UmbracoCms upgrade also added ModelsBuilder package by default, removing it fixed this problem.
Eventually I saw the Umbraco Installation Wizard which led to seeing more problems and fixing them. Breaking point for me was seeing the following problem as it meant missing umbraco dlls, according to Umbraco forum answers;
Second approach;
As I mentioned above, before reaching this point, I had to go thru the Umbraco documentation once more to understand the correct path for the upgrade - having said that I think upgrade term could be a little misleading, as this is not really an upgrade, but creating a new Umbraco project, moving and transforming v7 data into v8, and re-creating all the custom code again with a lot of code changes. Please see the steps below for this approach;
- Make sure you have got minimum system requirements.
- Make sure you have got all the code & db backups.
- Fresh up a new 8.6.3 Umbraco website by following these steps, without doing a normal upgrade on the existing v7 project, as there is no direct upgrade path between these 2 version.
- After making sure all is good with the brand new Umbraco 8 website(Ctrl+F5 will help you fire up the new local website, then you should do a fresh umbraco db installation without creating any templates, and then login to umbraco backoffice and do general smoke tests), do the data migration for content, media and members, from v7 db to v8 db by following these steps.
- Check the configuration files, settings, sections in Umbraco etc.
- Move v7 project's custom code into v8 project, and make them work again(a lot of refactoring will be needed for this - there is some up-to-date umbraco documentation which will hopefully help you to understand some of the changes)
With this second approach, creating a new v8 project was pretty smooth, and all seemed okay, but when I started to do the migration, I started to see the new problems - once again, please follow the links to see the answers that helped me sorting out these problems;
- Login fails when trying to upgrade
- Timeout Expired exception during data migration
- After adding an extended Connection Timeout to my connection string, data migration seemed to be started, but eventually after some hours failed with another Timeout error, you can see that similar problems have been reported before.
- I couldn't go any further than this due to my current project plan, but when I can I'd like to carry on my investigation for this and hopefully complete the data migration.
Conclusion;
- It seems to be Umbraco v8 upgrade from v7 is not really an upgrade, but literally creating a new v8 project, doing the data migration, moving the custom code&settings, and making sure all is good again. You should know that for big projects, this is a lot of work and you need to make sure this is really what you want/need to do.
- When creating new projects, definitely v8 should be your choice as it is the main focus of Umbraco, and it is the greatest version so far.
- For v7 projects, I wouldn't recommend you to do a v8 upgrade, unless you have got real good reasons and time(and money to spend for this). Umbraco will continue to support v7 which is great news for all v7 projects.
- For data migration, writing your own data migration code could be a good option, similar to what Paul Seal did.
Hope this will help at least some of you and let me know about your v8 upgrade experience. Thanks for reading.
Comments
Post a Comment