Upgrade from K7 to K9, and passing by K8, 8.1 and 8.2

Anonymized User asked on November 23, 2016 15:30

Hi guys,

Here is a quick look at our solution:

  • Kentico 7 webapp base project (base folder)
  • Presentation Layer: build by several different webapp projects which includes custom transformation, webparts etc etc(these files are also located in the base folder but virtually excluded from K7 base project and virtually included in Custom webapp projects)
  • Presentation Layer, Business Layer and Data Layer(about 20 different projects): here, the key feature is that all of these projects uses an abstraction over Kentico assemblies so migration and testability is improved)

So, we have started a massive upgrade from K7 to K9 and we have look into multiple upgrade possibilities.

However, in each upgrade documentation webpage(ex: https://docs.kentico.com/display/K8/Upgrading+Kentico+7+to+8) it specifies that we should launch the website before performing the next major version upgrade as the website itself performs some object imports.

So my question is: From what I understand, Kentico 7 to 8 migrated performs Code First actions onto the database on first launch, so it is NOT possible to upgrade the code directly from K7 to K9?

If otherwise, can anyone point me out some information relative to this subject.

Many thanks,

Correct Answer

Matthew Sandstrom answered on November 23, 2016 16:27

Hi Pierre,

In cases with a lot of customization, one thing you could try is for each target version in the upgrade process, create a clean upgraded instance that you can connect to your database to run the first-request script (UpgradeProcedure.cs) after running the SQL script directly on the database. This will allow you to upgrade your database all the way to v9 without having to do hours of api changes at every step.

As David mentioned, you can check that UpgradeProcedure.cs applied correctly at each step by checking the Event Log (available in the UI and the CMS_EventLog table)

Then you can separately migrate your customizations to a clean 9 filesystem.

1 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on November 23, 2016 15:50

Correct, after every upgrade there are database changes that need to be performed first. Make sure these scripts finish by looking at the Kentico event log.

what you can do however is make sure you've got all the upgraded files ready so you can immediately 'deploy' them if the DB finishes upgrading.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 23, 2016 16:18 (last edited on November 23, 2016 16:19)

Correct, as David States there are database scripts and changes which execute and clean up the database and also remove/replace files in the file system in the first startup of the site after the upgrade. So short answer is there is no direct upgrade from 7.x to 9.x without going through v8, v8.1, v8,2

To properly upgrade your code, all of those other references projects will need to have their code upgraded as well as their references to the upgraded Kentico dlls. Expect your upgrade to take some time, especially testing the whole process of the upgrade.

Speaking from experience, sometimes having all your objects in different projects over-complicates things ans makes things worse than they should be. You could also reach out to a partner like David or myself or even Kentico Consulting to assist with the upgrade.

Good luck!

1 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on November 23, 2016 16:45 (last edited on November 23, 2016 16:50)

I believe it is kinda the same algorithm when you do your upgrading. We've upgraded to (8.2.xxx) from 7. We install new clean 8 installation over existing 7 DB, then upgraded DB to the latest of 8 (8.2.xxx), then went into fixing the code.

Check this post: UPGRADING TO KENTICO 8.X? SOME IMPORTANT STEPS TO NOT OVERLOOK

Here is our steps:

  • Upgrade DB to 8.0 using installer
  • Run the site - If first run is not successful (response time is too long) - iisreset
  • Check database SELECT KeyName, KeyValue FROM CMS_SettingsKey WHERE KeyName IN ('CMSDBVersion', 'CMSDataVersion')

Result must be

Image Text

  • Check Event Log - It must have records like (in the example below is for 8.1 , but you should get the same for 8.0):

Image Text

  • Update DB to 8.1
  • Run the site - If first run is not successful (response time too long) - iisreset
  • Check database. Result must be

Image Text

  • Check Event Log: it must have upgrade records.
  • Upgrade DB to 8.2
  • Run the site, If first run is not successful (response time too long) - iisreset
  • Check database. Result must be

Image Text

  • Check Event Log in Kentico 8.2. Result must be like: Image Text
  • Update DB to 8.2.
  • Run the site :
    • If first run is not successful (response time too long) reset server (iisreset)
    • If application is offline rename file App_Offline.htm to App_Offline.htm_
  • Reset server if response time too long.

Actions after the installation : - rebuild all views - rebuild custom indexes

Now you can start fixing your code/transofrmations etc using Kentico API changes

P.S. Cheers from Montreal :). When you are done upgrading post here any problem you solved. We are very much interested in them :)

0 votesVote for this answer Mark as a Correct answer

Anonymized User answered on November 24, 2016 16:49 (last edited on November 25, 2016 01:37)

Thank you very much David and Matthew.

One of the very important point at our business is that we must respect a 99.99 SLA as our website has constantly a lot of simultaneous connections. That said, most of them are read-only connections.

Lucky we are, we have a backup of the production database so I can run as many times as I want the upgrade procedure.

So basically, I will run the upgrade from 7 to 8, 8.1, 8.2 and 9 manually, then I will probably extract the UpgradeProcedure.cs from each version and create an automated upgrade tool!

Thank you so much for these precious informations guys!!!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.