Skip to content

Upgrade Procedure

Trevor Fayas edited this page Mar 23, 2023 · 10 revisions

When you upgrade or hotfix a Kentico site, the system upgrades the Application + Runs a SQL Update script, and afterwards requires you to run the website to finish installation. Because of this, it is recommended that you run the SQL Upgrade script alone to go from 12.0.X to 13.0.0, and then use a fresh base Kentico 13 solution going forward.

Follow these steps carefully for a smoother upgrade processes.

Possibly Disable Custom Indexes / Views

(BACKUP)

The KX12 to 13 Converter tools handles most conflicts that can occur with the upgrade, however custom indexes, views, or constraints may interfere with the upgrade scripts. Consider going through your database and any user-defined indexes / views / constraints that were created on base Kentico Tables, script the "Drop and Create" for these, and run the Drop commands (and save the Create for after upgrade).

Extract the KX12 to 13 Upgrade SQL Script and Run

(BACKUP)

  1. Next, go to the Kentico Upgrades page and download the Kentico 12.0 to 13.0 file.
  2. Run and install the files (Default is C:\Program Files(x64)\Kentico\13.0\Upgrade120_130)
  3. Go to the installed location, and find the sql upgrade file (default C:\Program Files (x86)\Kentico\13.0\Upgrade120_130\SQL\upgrade.sql)
  4. Run this file against your Kentico 12 database, if there are any errors then roll back, fix, and re-run until it runs completely.

Run for first Time with Base Kentico Xperience 13

(BACKUP)

  1. Use the Kentico 13 Installer to install a Kentico Xperience 13 Solution (may want to install a database WITH THE SAME SQL COLLATION AS YOUR UPGRADED DATABASE as well for post-upgrade steps)
  2. Copy your connection string and CMSHashSalt over to this new Base Kentico Xperience 13 Solution
  3. Make sure that the IIS app pool has permission on the files of the new install (so it can read the upgrade zip)
  4. Set the SQL Connection timeout to a very high number (60000) so no sql timeouts during first-run upgrade operations
  5. Set the Compliation Debug = true so there are no request timeouts during first-run upgrade operations
  6. Point your IIS to the new base solution
  7. Run the site (this may take a while). The operation must run fully, if it doesn't then you may end up with a botched upgrade and need to roll back.
  8. Run the Macro signature resign, then System -> Clear cache / restart application.

Check Database for Missing Items

The upgrade tool catches a lot, but it doesn't catch EVERYTHING. There are often missing constraints, indexes, form definitions, etc. It's important to clean these up using the Post Operation Check Scripts before proceeding.

  1. Add a fresh Kentico 13.0.0 database on the same server as your upgraded solution (this will be used as the comparison)
  2. Create a separate SQL script to store all the operations you perform in case you need to re-perform them.
  3. Run any custom indexes/constraints from Possibly Disable Custom Indexes / Views
  4. Check Tables: This script will help you identify an table inconsistencies with table column definitions (keep in mind "size" for nvarchar is 2 per character, so size 100 = nvarchar(50)).
  5. Constraint Check: This shows any missing indexes / constraints. If a key exists but is different, you often have to Script -> Drop to on your version, then Script -> Create To from the fresh Kentico 13 database.
  6. View Check: This checks for any Views that are either missing, different, or added. You may want to consider cleaning up anything no longer needed.
  7. Stored Procedure/Function Check: This checks for any functions / procs, often you get some 'false positives' in this due to spacing, but best to update to make sure.
  8. Classes and Forms: This one is important, if any base Kentico class (except maybe CMS.User / CMS.UserSetting) has different schema, or outdated Alternative Forms, it can cause issues in your UI. Run this, and use a comparison tool to see what changes are found and update.
  9. Once finished, Run the Macro signature resign, then System -> Clear cache / restart application.

Once these are complete, your database should be ready to hotfix.

Hotfix

(BACKUP)

  1. Register your Kentico 13 Installation Manager to the new Base 13 Solution that you just ran.
  2. Run the Hotfix on it and hotfix to either the latest version (if using the HBS KX13 Baseline, may want to hotfix to it's latest hotfix version, then once set up hotfix the entire solution again). Be sure to backup site and database during this.
  3. Rebuild your Web Application
  4. Run the admin once more.

Start Refactoring / Adding your MVC Solution

(BACKUP) At this point, you have a base Kentico Xperience 13 Admin WebApp, and you can start slowly adding in your customization, making sure they are compatible as you go.

You should use the base MVC Site, or the Baseline, and start building your site.