Updating to the latest version of Xperience by Kentico
13/07/2022For just over half a year, my website has been running on an early pre-release version of Xperience by Kentico.
The journey began back in January 2022, shortly after becoming an MVP, I was given access to Milestone 4. Milestone 4 was the first version of Xperience by Kentico that had enough functionality to build a small blog website, so I decided to migrate my own!
This was the perfect opportunity to explore the new platform, while being able to offer suggestions and improvements to the Kentico Xperience team. Many points I highlighted were resolved in Milestone 5, so of course when that became available I immediately wanted to apply the latest update.
Updating to Milestone 5
March 2022 saw the release of Milestone 5, bringing a few new features and UI improvements, while making steps towards a version ready for public use.
When I originally built my website using Milestone 4, I had been warned that Milestone 4 databases would not be compatible with the fully released product, and that I would need to recreate my website’s database in Milestone 5. My website is rather small, so recreating the database was a minor task and certainly didn’t scare me off from exploring!
So how did I do it? 🤔
I started by creating a Milestone 5 database using the dotnet command kentico-xperience-dbmanager, the documentation contains exact steps for doing so.
Once the database had been created, I needed to ensure I was using the latest LTS of .NET, so I updated my project to use .NET 6. I was previously using .NET 5, but this is no longer supported.
Now I needed to update the NuGet packages to the latest version, this meant updating Kentico.Xperience.AspNetCore.WebApp and Kentico.Xperience.AspNetCore.Admin.
I needed to ensure the database configured in the connection string matched the new database. Once this had been done, the admin site loaded! 🎉
Normally when updating Xperience by Kentico websites you wouldn't need to recreate your database, but since I was recreating the database I had to recreate my Page Types and then copy the pages from the old database.
Updating to Milestone 6
Milestone 6 has only recently released in July 2022, also known as Xperience Adopters Program (XAP). This is the big update everyone has been waiting for, it is the public launch of Xperience by Kentico. Partners and customers could now start using the platform to build their new websites.
The process for updating Xperience by Kentico websites is very simple and fully documented, but these are the steps I followed to update my website to the latest version.
To start with, I backed up my current database to ensure that I had a rollback point in case something went wrong (you never know! 😊).
Normally the next step would be to update the NuGet packages to the latest version, but I had to deviate from the documentation slightly here. Milestone 5 and earlier versions used Kentico.Xperience.AspNetCore.WebApp and Kentico.Xperience.AspNetCore.Admin NuGet packages, but now the NuGet packages have been renamed Kentico.Xperience.WebApp and Kentico.Xperience.Admin. So, instead of updating I just had to uninstall the old versions and install the new ones.
When rebuilding the project, there was one breaking change I needed to correct in my code. I had been using SiteContext which has now been made internal, so I had to switch this out for Xperience’s new ISiteService which is available through dependency injection.
Once I had corrected the code and got the website building, the next step was to run the database update scripts. This step is actually really easy (make sure you run the command from the right directory 😂 - I hadn't in my screenshot below!). To update the database, you simply run:
dotnet run --no-build --kxp-update
After about 30 seconds, I then received the following confirmation that my database had successfully been updated to the latest version.
With XAP launching, Xperience by Kentico now uses a new license key format, so I had to update the configured license key. This was the final step, and both presentation and admin sites loaded. 🎉
You'll probably notice a few visual differences between this and the previous version.
Firstly, with Kentico Xperience refreshing its name to Kentico, the logo has been updated to reflect that change. Secondly, the admin site has a nice purple theme applied to it, giving the whole user interface a nice refreshing feel. Lastly, improvements to the content tree UX including reordering pages was a welcome change.
With hotfixes and refreshes coming regularly for Xperience by Kentico, it is great to know that updating your Xperience by Kentico website will be so simple going forward!
You might also be interested in...
Umbraco Tips for Newcomers: Insights from an Outsider
19/12/2024I have published my first Umbraco related article in the calendar, 24 Days in Umbraco. It provides insights for newcomers, some tips on how to get started. Read more about the article.
How to Easily Extend Xperience by Kentico UI Pages with Page Extenders
13/09/2024UI page extenders in Xperience by Kentico allow you to customise existing UI pages without modifying their source code. In this post, we’ll walk through a simple example of reordering columns in a listing layout to better suit your needs.
Enable Quick Page Editing from Your Xperience by Kentico Website Channels
23/08/2024Simplify content management with this new package for Xperience by Kentico. It adds an "Edit Page" button to your website channels, allowing editors to quickly access the Kentico administration interface and make updates effortlessly. Enhance your workflow and keep your content fresh with ease.