How to upgrade Sitecore 8.2 to Sitecore 9 Update 1

The new version of Sitecore includes lots of new features and some important updates as well. Some of these changes require sensible server modifications.

For example, the index engine Lucene isn’t supported anymore. This induces the installation of SOLR. Instead of describing each of these solutions, we decided to write a whole tutorial to guide you through these several steps.

Sitecore provides different tools to upgrade your instance easily. This following tutorial show you an easy way to use them and getting your sitecore server ready to rock this version !

Before that, juste make sure to fasten your seat belts, and to install these needed softwares :


  1. Windows Powershell version 5.x
  2. Sitecore license xml file
  3. MS SQL Server version 2016 (NOT 2017 since it still not supported by Sitecore yet)
  4. MS SQL Management Studio
  5. Note: Please ensure the SQL Server is enabled the mixed mode authentication: SQL Server and Windows Authentication mode.
  6. Java Environment (SDK and JRE) version 8.x
  7. Web deploy version 3.6
  9. Note: Please check the compatible table from Sitecore:

Let’s go !

STEP 1 Setup and Install required components

Setup Environment variables

Go to My Computer and open Environment Variables as figure below

Add new two environment variables into the list as figure below:

Update the PATH variable:

Click OK to confirm.
Note: We have two separate variables:

  • The JAVA_HOME path, where is the Java SDK, installed by download it from Oracle Java website.
  • The JRE_HOME is the place of the Java Runtime Environment installation folder


Install SOLR

  • Download SOLR version 6.6.2 from the url below which has been fixed the critical lock issue
  • Extract it into a specific folder such as D:\solr-6.6.2
  • Download the NSSM tool from the link:
  • Note: You can use the pre-release version number 2.2.4-101 to avoid an issue with services failing to start.
  • Extract and get the nssm.exe file
  • Put it into the same bin folder of the installation SOLR folder:
  • Open Command Prompt (run as an Administrator)
    • Go the SOLR bin folder as above:
    • Type: nssm install solr_6.6.2
    • Click on Install service button for installing the Solr windows service

Note: Please turn off all Solr console instance if there is any instance running before we install solr run as a windows service to avoid conflict.

When the SOLR being installed successfully you can access it as figure below:

Setup SSL for SOLR

Download the solrssl.ps1 from the link

Many thanks Kam Figy (

Put it into a specific folder such as: D:\sc9\solrsslconfiguration

Open Windows PowerShell (run as Administrator)

Execute the command line:
Set-ExecutionPolicy -Scope CurrentUser Unrestricted

Press A to allows we can execute script without any problems about the permissions.
Execute command .\solrssl.ps1 as figure below:

Copy two files above and put them in the SOLR installation folder \server\etc folder
Open the (this is the configuration as input parameters of SOLR), adding all lines as in the figure put them into the end of file.
Restart the solr_6.6.2 service and now you have to browse the solr admin tool with the https protocol.

Installing the Sitecore Installation Framework

  1. Launch PowerShell under Administrator right.
  2. Using Windows PowerShell to install by followings ordering command line: Register-PSRepository -Name SitecoreGallery -SourceLocation Note: This command line setup a repository specific to Sitecore
  3. Install the Sitecore Installation Framework by Powershell: Install-Module SitecoreInstallFramework
  4. When prompt to install, approving it by press Y and then press ENTER to confirm. Note:  If you have installed the Sitecore Installation Framework so you only need to update the latest version of the Sitecore Installation Framework by executing the command line: Update-Module SitecoreInstallFramework

Enable Contained Database Authentication

To enable the SQL server to allow the creation of users when using the Sitecore Installation Framework, you must ensure that the target SQL Server is configured correctly. To configure the target SQL Server to allow users and logins to be contained at the database level:

  1. Launch MS SQL Server Management Studio and log in as an administrator.
  2. Run the following Query:
    1. sp_configure 'contained database authentication', 1;
    2. GO
    4. GO

STEP 2 Installing the Sitecore version 9.1 Update 1

  1. Go the link:
  2. Download appropriate installation package.

We install all in one server with full features so we must choose XP Single otherwise for scaled clustering servers such as multiples CDs, CMs and separate database and xDB servers then we have choose XP Scaled.
XM package is the package only available for Content Management system without xDB as well as Marketing module.

3. Unzip it into an individual folder (in the sample we have used D:\SC9\Configuration)

Note: Please Unblock those files for ensuring it allows to run on the server.

4. Unzip XP0 Configuration files 9.0.1 and copy and paste all files into the D:\SC9\Configuration:

5. Get three files sitecore-XP0.json, xconnect-XP0.json and sc91_install.ps1 from the place:

Note: Please check and unblock those files.
Copy and overwrite two files: sitecore-XP0.json, xconnect-XP0.json.
Open sc91_install.ps1 script and modify values of parameters in that file:

Execute it by launch Windows PowerShell as Administrator:

After you setup successfully then you can launch the Sitecore website. However, we are still one step to wrap up everything.

STEP 3 Post installation (Configuration for xDB)

1. Configure username and password:
(1) Launch MS SQL Server Management Studio and login as an administrator
(2) Open a new query windows, paste the script below

:SETVAR DatabasePrefix sc91
:SETVAR UserName collectionuser
:SETVAR Password Test@12345
:SETVAR ShardMapManagerDatabaseNameSuffix _Xdb.Collection.ShardMapManager
:SETVAR Shard0DatabaseNameSuffix _Xdb.Collection.Shard0
:SETVAR Shard1DatabaseNameSuffix _Xdb.Collection.Shard1

IF(SUSER_ID('$(UserName)') IS NULL) BEGIN        
CREATE LOGIN [$(UserName)] WITH PASSWORD = '$(Password)';

USE [$(DatabasePrefix)$(ShardMapManagerDatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)') BEGIN    
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]         
GRANT SELECT ON SCHEMA :: __ShardManagement TO [$(UserName)]       
GRANT EXECUTE ON SCHEMA :: __ShardManagement TO [$(UserName)] END;

USE [$(DatabasePrefix)$(Shard0DatabaseNameSuffix)] 

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)')
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]         
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(UserName)'

USE [$(DatabasePrefix)$(Shard1DatabaseNameSuffix)] 

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)') BEGIN    
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]         
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(UserName)' END;


Please change the parameters (DatabasePrefix, Password) which have been bold on the script above based on your environment. Please consider the Password value has to match with the password which has been configured in the Sitecore

Turn on SQLCMD Mode for ensuring the compiler can compile the script above.

(3) Execute it.

2. Rebuild the Search Indexes and the Link Databases:
After you install Sitecore, you must rebuild the search indexes, and the Link databases by go to Control Panel inside Sitecore Administration:
a. In the Indexing Manager dialog box, click Select all, and then click Rebuild.
b. Rebuild the Link databases for the Master and Core databases.

If you follow properly these steps, your sitecore 9.1 environment should be installed, configured, and ready to be explored. Enjoy your journey !

Toan Vo