8 Tips for a Smooth Sitecore Upgrade

Jim Manson Jim Manson
June 25, 2014
Sitecore , Web Development

Like any software company, Sitecore is constantly updating their product to improve features, create better security and provide faster performance. Upgrading is inevitable. Although it is best to have someone with experience and Sitecore specific expertise to do the upgrade, it’s not always possible, and you may find yourself facing the upgrade. These tips can help make your upgrade process go smoother than it might otherwise.

Tip #1: Use short path names

When you start an upgrade and you get a copy of the production website files and databases to setup your upgrade environment, be sure to put it as near the root of the drive as possible. If you have a moderately deep file structure (i.e. C:\inetpub\wwwroot\ourdomainname\web) you will get many errors due to the file path name being too long for some of the files being updated. A better approach is to use a very short path during the upgrade (like C:\u\72\web = u for update, 72 for the version, web for the webroot folder)

Tip #2: Change timeout values for database

By default, there are two settings that are not present in the Web.Config file. They are "DefaultSQLTimeout" and "DataProviderTimeout"; however, you can add them, so you can override them. The default values are 00:05:00 (5 minutes). Why this is required you may ask? Let’s think about the two main things a Sitecore Version Upgrade consists of: the Database Upgrade Scripts and Installing the Upgrade Package. Usually running Database Upgrade scripts is not a problem, We are working directly with the database using some sort of a DBMS (i.e. say SQL Management Studio in case of SQL Database). When installing the upgrade package, it is a different story. Since we are updating data (Sitecore items/ and Settings), the database activity from Sitecore to the database and the time required to install the upgrade package is dependent on the database size, so you may need to increase the database timeouts for success.

These settings define how long the .Net Code will wait before it declares that the SQL query has timed out. This allows some slower queries to be executed successfully instead of timing out.

To override these settings, add the following in the <settings> section in Web.Config File:

<setting name=”DefaultSQLTimeout” value=”00:30:00″/>

<setting name=”DataProviderTimeout” value=”00:30:00″/>

Of course, if you have other databases like Analytics or Web forms for Marketers then you would do the same with them. 

Tip #3: Backup, backup, backup 

You cannot create too many backups. When doing an upgrade you may be going through multiple versions of Sitecore, each building on the last. By backing up both the website files and the databases after each version it allows you to start again at any point needed. For the website folder, I create a copy of the successfully updated site to start the next version upgrade, thus leaving a working copy at the previous version. For example:

C:\ ---+

           |---u---+

                        |

                        + 6.1

                        |

                        +6.2

                        |

                        +6.3

                        |

                        + etc……

You also want to do the same with the databases so each version has its own databases. I do this with the name of the database like this:

Sitecore_61_Core     Sitecore_61_Master  Sitecore_61_Web   

Sitecore_62_Core     Sitecore_62_Master  Sitecore_62_Web   

Sitecore_63_Core     Sitecore_63_Master  Sitecore_63_Web   

Sitecore_etc_Core     Sitecore_etc_Master  Sitecore_etc_Web

Tip #4: Use separate folders for versions

This relates to the previous tip but also allows you to have separate copies of the config files for each version to fallback to if you have to go back a version or two to begin again. It saves time if you have already saved a copy of the working updated config file for that version.

Tip #5: Don't forget DMS and/or WFFM

Even though you are running the Sitecore update packages, don't forget that some modules have their own update packages that need to be run to update them such as DMS, Web Forms for Marketers, and Email Campaign Manager to name a few.

Tip #6: Use a mail pickup folder

You can also add the .Net settings to use an email pickup folder so that while you are upgrading you don’t lose time troubleshooting email issues of connectivity to a production email server or send out messages that you may not want going out to real people. Using an email pickup folder allows you to test the contact forms and review the generated email. Sitecore will not error out due to not reaching the mail server.

<system.net>

    <mailSettings>

      <smtp deliveryMethod="SpecifiedPickupDirectory" from="no-reply@mydomain.com">

        <specifiedPickupDirectory pickupDirectoryLocation="C:\u\testemail"/>

      </smtp>

    </mailSettings>

</system.net>

Tip #7: Don't ignore errors

When upgrading, it is tempting to ignore some errors, especially if you are not using the particular feature that the upgrade complained about. Don’t do it. An example is when upgrading from 6.4 to 6.5; let’s say you receive errors regarding copying files over for DMS. You aren’t currently using DMS so you figure it’s no big deal. It IS a big deal because even though you are not using it currently, it can cause a lot of trouble down the road. Some of the errors may actually be updating important files or updates to database schemas that are required for Sitecore to run properly that cannot be updated as easily at another time, if even at all without redoing the upgrade. It can have a domino effect as you move to newer versions.

Tip #8: Download SSPG

When you do run into errors during the upgrade process (and you will), you may need to contact Sitecore Support. You will want to download and use the Sitecore Support Package Generator. It can be found in the Marketplace and it is free. It collects config files, logs file, and a whole lot more into a single file to help diagnose the issue. It will save you time collecting the files Sitecore Support will ask for, and it is a best practice to use it and upload the file when you initially create a support ticket.

What additional tips do you have for a smooth Sitecore upgrade?

 

comments powered by Disqus

STRATEGIC PARTNERS