Upgrading from Sitecore 9.3 to 10.3: A Practical Guide

Introduction

Upgrading to the latest version of Sitecore brings a multitude of benefits, including enhanced features, improved performance, and strengthened security. In this practical guide, we'll explore the step-by-step process of upgrading from Sitecore 9.3 to 10.3, discussing the key considerations and best practices for a successful upgrade.


Understanding the Upgrade Process

    1. Assessment of Current Environment

  • Gather detailed information about your existing Sitecore 9.3 environment, including the databases, custom code, modules, and integrations.
  • Check the compatibility of your custom code, modules, and third-party integrations with Sitecore 10.3.

   2. Backup Your Data

  • Before initiating the upgrade process, ensure that you have a robust backup strategy in place for all databases, files, and configurations.

   3. Evaluate System Requirements

  • Review the system requirements for Sitecore 10.3, including supported operating systems, databases, web servers, and other dependencies.
  • Ensure that your infrastructure meets the prerequisites for the new version.

   4. Upgrade Order

  • Follow the recommended upgrade order provided by Sitecore. This usually involves upgrading Sitecore XP, followed by any modules, custom code, and integrations.

Practical Steps for Upgrading from Sitecore 9.3 to 10.3

1. Update Sitecore Installation Framework (SIF) Tools

  • Ensure that you have the latest version of Sitecore Installation Framework (SIF) tools installed to support the upgrade process.

2. Upgrade Sitecore Experience Platform (XP)

  • Download the Sitecore 10.3 installation files and follow the upgrade guide provided by Sitecore.
  • Execute the upgrade scripts provided by Sitecore to upgrade the databases and schemas.

3. Migrate Custom Code and Modules

  • Assess and update any custom code and modules to be compatible with Sitecore 10.3.
  • Test the custom code and modules in a development environment before migrating them to the upgraded Sitecore instance.

4. Test Functionalities

  • Perform comprehensive testing of all core functionalities, custom components, and integrations to ensure they work seamlessly in the upgraded environment.

5. Performance Optimization

  • Leverage new features and improvements in Sitecore 10.3 to optimize the performance of your website or application.

6. Security Hardening

  • Implement any additional security measures or configurations recommended for Sitecore 10.3 to enhance the security of your environment.

Post-Upgrade Considerations

1. Documentation and Training

  • Update the documentation and provide training to the relevant teams on any new features, changes, or best practices introduced in Sitecore 10.3.

2. Monitoring and Maintenance

  • Set up monitoring tools to keep an eye on the performance of the upgraded environment and establish a regular maintenance schedule.

3. Backup and Disaster Recovery

  • Review and update your backup and disaster recovery plans to align with the upgraded environment.


A Sample Proof Of Concept

In order to provide a real time Scenario, I have installed Sitecore 9.3 in my Local machine.


While installation it will ask for Solr Port and service name. I used Port number 8999 and service name as sc93.


the service gets installed as 

While installation, I faced a typical problem of Host file access denied. Due to which installation was not going ahead. After trying many options from Stack Exchange I was finally successful.

All I had to do is do not browse internet till the installation is successfully completed and pause the Antivirus. I use Kaspersky, Right click and select Pause Protection.


After completing the installation I want a demo running web site. I got the Demo web site for 9.3 from git with SXA implementation, this was mentioned in the blog written by Serge van de Over

To cut the example short, fix the NuGet errors and build. finally create publish profile on "Build.Shared"



Once you are done with selecting path where you want to publish and click finish. Yu will land up in below page where you need to cleck on "Show all Settings"


Click on Connections in this popup, it will show folder path


once done click publish.

You might have some issue after you publish, I assume you can mange to fix them :-)

This web application is full fledge SXA driven app.  You will see lot of functionality . The only thing missing from real world example is custom, 3rd party integration and modules from sitecore.




Now in order to move ahead, we need to download the upgrade guide for Sitecore 10.3 
read it thoroughly before implementing the same (SC-XP-10.3.0-Upgrade Guide-en.pdf).


I will try to make it short as per 9.3 to 10.3 focus.

Now we have a successful working Sitecore 9.3 web application. Our intention is to upgrade the same to Sitecore 10.3. 
 - We will start with first backing up the Database to ensure in any case we can come back to the working state we have achieved as of now. With Sitecore 9.3 installation I got below DB's that I will be backing up.

create back up in similar way for all the databases.

 - We will now download the DB scripts required to be run based on the guidance given in the Upgrade .pdf document.


unZip the files "Database Upgrade Script" , run the scripts based on the table given in guide at page number 22. 

For me I just ran the scripts one at a time from top to bottom based on the naming convention given on each script. 

I skipped  "CMS_core_master_web_8x.sql" script. 
Any file starting with  "SXP_collection_" need to be run on Both Shard DBs (Shard0 and Shard1).
since we are upgrading from 9.3 we can skip "SXP_mongodb_collection".

Once we have run scripts successfully. We then need to prepare our backend code.
go to Visual studio. 
Sitecore 9.3 version is on .Net framework 4.7, As per Sitecore 10.3, we need to upgrade the dot net framework version to 4.8. 


Build the solution. Check for the Warnings and Error. Fix them. If we get deprecated, absolute or breaking changes. replace them.

Next upgrade the sitecore dlls. from 9.3.0 to Sitecore 10.3.0.

Right click on each of the solution and select Manage NuGet Package manager. Upgrade each sitecore dll to Sitecore 10.3.0 (Our POC is to come till Sitecore 10.3.0)

Again Rebuild the app and check for Errors or warnings if any, fix them.


Now Download "Sitecore Upgrade App" from the Sitecore XP 9.3. this file will have clean up tool.

Stop the functionality that uses analytics
If you have 3rd party application accessing Contact / interaction Data from xConnect, you must stop it. 
Since we are upgrading from Sitecore 9.3 , we can follow this stop and resart mechanism. In case you are on 9.0.2 or Earlier this mechanism will not work. the detailed information is give in the guied at page number 13.

in Realtime scenario. Check if ProcessingEngineTasks database Task Table is empty.
if you cannot wait for the Task table to get empty, detailed information is given in the guide download before at page 14.

Stop all content tests It is simple process, refer page 14.

Now Clean up the content Databases.
refer to page 15 to 

- On the Sitecore Launchpad, open the Control Panel, in the Database section, click Clean up databases, select all the databases, and then click Clean.

- Locate the Sitecore.UpdateApp 1.3.1 for Sitecore 9.3.0 rev. 003498 (XP).zip file that you downloaded earlier and extract its contents to a folder, for example, C:\Sitecore.UpdateApp.

- Copy the license file to the Data folder of the tool, for example, C:\Sitecore.UpdateApp\Data\license.xml.


- In the C:\Sitecore.UpdateApp\App_Config\ConnectionStrings.config file, update the connections to your databases.


- Add the upgrade resources from every module and connector to the UpdateApp Tool files.
In my case it was not required therefore I skipped the part. for reference it is on page 18.

- finally open command prompt go to the path where "Sitecore.UpdateApp.exe" resides. example 
"C:\Sitecore.UpdateApp\Sitecore.UpdateApp.exe".
you can run  "cd c:\Sitecore.UpdateApp" then run "Sitecore.UpdateApp.exe clean"

- now clear the cache from your browser (Refer page 19). To clear the caches, open the <instance_url>\sitecore\admin\cache.aspx page, click Refresh, and then click Clear all.

We have now reached a point where our code and DB are in a position to be utilized by Sitecore 10.3 instance.

Install Sitecore 10.3 Instance.
 From Installation perspective we will be using Graphical User Interface as we did for Sitecore 9.3
Download Sitecore 10.3 Graphical Setup


once downloaded, we than unzip and run the Sitecore.exe. Steps are simple. For Solr we will use port 9000  and for service name we will give prefix as Sc103.

Again, my simple way to get thing install successfully, - Pause the anti virus, stop using internet till installation is completed.

Now after successful installation of Sitecore 10.3, The very first thing to do is backup the DB and Website Folder as done for Sitecore 9.3. This will ensure we can come back to same position whenever required. 

Now we will be changing my connection string for 4 DBs to the upgraded DB's


 after changing the connection string Browse the URL for Sitecore 10.3 (with connection changed to 9.3 DB upgraded).

You should see the home page as shown below. which means our upgradation was successful.


Some unusual Errors Faced:
Issue: ManagedPoolThread #0 18:35:36 WARN Failed to create counter 'Sitecore.System\Logging | Informations Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.

Solution: In CMD run C:\WINDOWS\system32> net localgroup "Performance Monitor Users" sc92sc.dev.local /add

Reference: https://sitecore.stackexchange.com/questions/20384/warn-failed-to-create-counter-sitecore-analytics-xconnect-xconnect-model
___________________________________________________________________________
Issue: Access to the path '$(sourceFolder)\Shared\Foundation\Accounts' is denied.

Solution: Added variable in Unicorn.Helix.config

Reference: https://stackoverflow.com/questions/74305967/problem-with-access-to-the-path-sourcefolder-foundation-articles-serializat
____________________________________________________________________________
Issue: Unknown connection string. Name: '$(1)' - Unicorn

Solution / Reference: https://sitecore.stackexchange.com/questions/27954/unknown-connection-string-name-1-unicorn

Issue: Nuget Manager for Entire solution not working due to down grade of some dlls.

Solution / Reference: I encountered errors related to the following main dlls: "Microsoft.Extensions.DependencyInjection," "Microsoft.Extensions.DependencyInjection.Abstractions," and "Sitecore.Kernel." I need to remove these dlls from all the projects and then re-reference; "Sitecore.Kernel" with the appropriate version, and the other two with the latest versions.

Conclusion

Upgrading from Sitecore 9.3 to 10.3 is a significant undertaking that requires meticulous planning, thorough preparation, and rigorous testing. By following best practices and leveraging the practical steps outlined in this guide, organizations can successfully navigate the upgrade process and harness the full potential of Sitecore's latest features.

Incorporating the latest advancements in Sitecore not only ensures that your digital experiences remain competitive but also provides a solid foundation for future growth and innovation.

Comments

Popular posts from this blog

Rebuild XDB indexing Issues

Sitecore Bulk Uploading Data Between Identical Databases