How To Upgrade Sitecore 7.2 To Sitecore 7.5

Sitecore upgrades can be a tiresome process compared to some other CMS systems. A NuGet package update can be a lot easier than the mammoth task that can face some Sitecore developers with the prospect of upgrading Sitecore. A lot of the community has their own views and opinions about which approach can be defined as ‘best’ practice. As with human beings, every project is different and there definitely isn’t a one size fits all solution. In today’s guide, I’m going to cover the process I used to upgrade a website from Sitecore 7.2 to Sitecore 7.5.

Getting Start Tips

When I did the upgrade I ran into a lot of issues, this generally meant that I needed to revert what I did and start from scratch several times. The recommended approach by many to architect a Sitecore solution is to use the clean Sitecore instance approach and publish all your changes into it, as discussed here: How To Architect Your Sitecore Website With MVC.

If you are using this approach, I recommend having a Zip file of the 7.2 clean instance to rollback to in a ZIP file and a 7.5 clean instance in a zip file. If things do go wrong, being able to compare config files and rollback quickly will save you a lot of time.

Installation Files

The first thing you will need is the correct files. As with any Sitecore upgrade, it is recommended to take an incremental approach and always upgrade to the first base version (in this case ‘Sitecore®Experience Platform™ 7.5 rev.141003’). The files you will need are:

NOTE: All these files are avilable from here.

Back-up

This goes without question. Before you start any form of upgrade, make sure you can roll back and start from scratch if things go awry. Always take a copy of your webroot and code files (that’s what source controls for) and your Analytics, Core, Master and Web database.

Run The SQL Scripts

The first you will need to do is unzip the upgradecms75_sql and run the included SQL script, UpgradeCMS75.sql’ against your websites Core, Master, Analytics and Web databases.

Disable Certain Config Values For Installation Only

If you do not do this, then the upgrade process will throw a wobbly and fail.

Add a ‘.disabled’ extension to the following files:

  • Sitecore.Analytics.config
  • Sitecore.Analytics.ExcludeRobots.config
  • Sitecore.Speak.config
  • Sitecore.EmailCampaign.config
  • Forms.config

Just to be safe, I also turned Analytics off within the Sitecore.Analytics.config file. Set the Analytics.Enabled to false.

Prerequisites / Issues

I thought I would include the issue I came across before you ran through the installation to try and help you prep as much as possible. On my first upgrade I had a lot of issues.

The first thing that caused me some pain was having the latest version of certain key assemblies in my bin directly. I use Nuget in my projects and as a result of adding certain packages, some key assemblies had been upgraded too far. When the installer ran, I ran into a lot of version mismatch exceptions. Trying to do the binding redirects didn’t work as the site will need to run on one version, downgrade an assembly without updating the binding redirect in the web.config as it progresses and consequently throw an exception during installation due to a version conflict.

sitecore_upgrade_7.2_upgrade_4
To make sure everything worked, I needed to ensure I was using the following versions (also check that every project in your solution is using the same version!

  • Json.Net needs to use version 6.0.0.0
  • HTMLAgility pack needs to use 1.4.6
  • HTMLAgility pack needs to use 1.4.6
  • Microsoft.AspNet.WebApi.Core needs to use 5.1.2

After I got through these annoyances I was then hit with a number of Analytic issues. The first one I kept on seeing was an invalid connection string issue:

sitecore_upgrade_7.2_upgrade_6

These errors are usually because you’ve forgotten to disable analytics, I tried to fix the issue by putting in the new analytics connection string data.

<add name="analytics" connectionString="mongodb://localhost/analytics" />
<add name="tracking.live" connectionString="mongodb://localhost/tracking_live" />
<add name="tracking.history" connectionString="mongodb://localhost/tracking_history" />

I tried running the upgrade process again and got this error (SO DO NOT TRY TO DO THIS AT HOME).

sitecore_upgrade_7.2_upgrade_5

The contacts repository settings relate to the new xDB stuff which makes sense and should be in your Sitecore.Analytics.config. As the update wizard is failing before it can upgrade your config files, the error makes sense. To get around this you need to make sure you have Sitecore.Analytics.config and Sitecore.Analytics.ExcludeRobots.config in your ‘App_Config’ -> ‘Include’ folder with a disabled extension, like so:

Sitecore.Analytics.config.disabled
Sitecore.Analytics.ExcludeRobots.config.disabled

In Sitecore.Analytics.config, you should also make sure ‘Analytics.Enabled’ is set to ‘False’. After this I then ran into this error:

‘Could not resolve type name: Sitecore.Pipelines.HttpRequest.OverrideDialogs, Sitecore.Speak.Client (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).’

sitecore_upgrade_7.2_upgrade_6

To get past this error you need to make sure that you have Sitecore.Speak.config in your ‘App_Config’ -> ‘Include’ folder with a disabled extension, like so:

Sitecore.Speak.config.disabled

If you have any custom modules installed then you may have to follow a similar process of adding the disabled extension to each modules config file.

After running the installation wizard, I also encountered this error:

“Could not resolve type name: Sitecore.ContentSearch.Events.PublishingEventHandler”

sitecore_upgrade_7.2_upgrade_8

This was an issue with the Lucene search the site in question was using and is related to ‘Sitecore.ContentSearch.config’. To fix the issue I copied the 7.5 version into ‘App_Config’ -> ‘Include’ overriding my existing file. I then added the .disabled extension to the end. I also copied the 7.5 version (1.0.0.4930) into my webroot and re-ran the upgrade wizard

Run The Update Installation Wizard

To open the ‘Update Installation Wizard’ in a web browser by adding ‘/sitecore/admin/UpdateInstallationWizard.aspx’ after your website name (make sure that you are logged in):

http://local.website.com/sitecore/admin/UpdateInstallationWizard.aspx

sitecore_upgrade_7.2

This should load the Upgrade Wizard.

sitecore_upgrade_7.2_upgrade

Click ‘Next’ and select upload the update package.

sitecore_upgrade_7.2_upgrade_1

Give the review screen a quick once over and click the ‘Analyze and install the package ->’ button.

sitecore_upgrade_7.2_upgrade_2

I would recommend choosing ‘Analyze’ before installation to see if you have any potential issues upgrading, so click the ‘Analyze’ button.

sitecore_upgrade_7.2_upgrade_3

Download the analysis to excel if you want to and press the ‘Install the package’ button.

sitecore_upgrade_7.2_upgrade_9

If everything goes to plan the installer should complete successfully. I would also recommend making a ZIP file backup of your new semi-upgraded webroot. When we start to add the new config files and assemblies back into your visual studio code solution and re-publish changes later, you do not want to accidently override any files etc..

Install The Reposting Database

I think when most people think of upgrading to Sitecore 7.5+ everyone always thinks Mongo. The Sitecore Experience Database (xDB) uses two database systems, SQL and Mongo to store the analyitics data. SQL is used to store aggregated reporting data, Mongo is used to store real-time experience data.

When you upgrade you won’t have a copy of the reporting database. To get around this I installed a fresh install of 7.5 and copied the analytics database from the ‘Database’ folder

sitecore_upgrade_7.2_upgrade_10

You need to install two copies of the reporting database. So, in the database directory for your upgraded website, make two copies of the 7.5 analytics MDF and LDF and attach them in SQL.

In your ‘App_Config’ folder, open up your ConnectionStrings.config and create two new connection string properties, reporting and reporting. The reporting secondary database is when Sitecore transfers live and historical data when rebuilding the reporting database.

Your web.config should now look something like this:

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
<!-- 
Sitecore connection strings.
All database connections for Sitecore are configured here.
-->
<add name="core" connectionString="user id=;password=;Data Source=(local)\SQLEXPRESS;Database=Sitecore75Sitecore_Core"/>
<add name="master" connectionString="user id=;password=;Data Source=(local)\SQLEXPRESS;Database=Sitecore75Sitecore_Master"/>
<add name="web" connectionString="user id=;password=;Data Source=(local)\SQLEXPRESS;Database=Sitecore75Sitecore_Web"/>
<add name="analytics" connectionString="mongodb://localhost/analytics"/>
<add name="tracking.live" connectionString="mongodb://localhost/tracking_live"/>
<add name="tracking.history" connectionString="mongodb://localhost/tracking_history"/>
<add name="reporting" connectionString="user id=;password=;Data Source=(local)\SQLEXPRESS;Database=Sitecore75Sitecore_Analytics"/>
<add name="reporting.secondary " connectionString="user id=;password=;Data Source=UKPC0067\SQLEXPRESS;Database=Sitecore_AnalyticsSecondry" />
</connectionStrings>

Updating Configuration Files

Re-enable Enable Sitecore.Speak.config by removing the .disabled extension.

In the project I upgraded, I didn’t need to worry about keep any existing analytics data or settings. If you are in a similar position, make sure you have a backup copy of your Sitecore.Analytics.config.disabled
Sitecore.Analytics.ExcludeRobots.config.disabled, delete them. As part of the upgrade process, Sitecore should have created you two new analytics config files if not, then copy over the Analytics configs from your fresh install.

Double check the ‘connectionstring.config’ looks ok. You need the follow analytics connection settings

<add name="analytics" connectionString="mongodb://localhost/analytics" />
<add name="tracking.live" connectionString="mongodb://localhost/tracking_live" />
<add name="tracking.history" connectionString="mongodb://localhost/tracking_history" />

IMPORTANT

Head over to Sitecore and have a look at Configuration File Changes between Sitecore CMS 7 Releases.

In here is a list of configuration changes you will need to make, depending on the upgrade path you have taken. Go through and make sure you have upgraded everything. The other option is to override your existing files, and then you beyond compare to see where the differences exist and make sure you copy the new changes in successfully.

If you use the content search then I would strongly recommend you read up on some of the potential pitfalls that you will encounter along the way.

Upgrading Sitecore Content Search-7-2-to-7-5/

Re-Index Your Search

As with any big upgrade or change in data, it is a good idea to re-index all your search results etc.. if you are unsure of how to do this, then I would recommend reading, How To Re-Index Your Search Results In Sitcore

Rebuild Your Link Database

In any upgrade the paths to certain items can change, so Sitecore recommends rebuilding your link database to make sure everything is pointing to the right location. If you are unsure how to do this, then read How To Rebuild Your Sitecore Link Database

Rebuild Your Search Index

After updating the links database, you also need to rebuild your search index. If you don’t know how to do that then I would recommend reading, How To Rebuild Your Sitecore Link Database

Clear Your Temp Data

Just to make sure nothing is cached from your 7.2 version, you should clean out your Temporary Internet files, clear your browser cache and do an IISRESET.

Upgrade Any Modules

If you have any modules installed, like web forms for marketers, then these may need to be upgraded as well. If you have WFFM installed, then I suggest you read, Upgrading WFFM When Upgrading From Version 7.2 to 7.5.

Publish The Site

After rebuilding indexes. Publish the site by going to Sitecore >> Publish Site and use the “Republish” option.

Conclusion

As each site is different, there is no one-stop shop for Sitecore upgrades. you might follow the advice above and encounter completely different issues than I did.

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts

1 reply

Trackbacks & Pingbacks

  1. […] You can also find the WFFM_Analytics.sql script is inside the .update package. If you change the extension of the update, from .update package to .zip you can unzip all the files. You need to run the scripts against the new reporting database you would have created in, How To Upgrade Sitecore 7.2 To Sitecore 7.5. […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *