/ >

Upgrading Umbraco from v6.0 to v7.3

My situation was that I had a client running Umbraco 6.0.5 who needed to upgrade to 7.3.6 (the latest stable release at the time of upgrading), but things weren't that simple.

Upgrading Umbraco from v6.0 to v7.3

My situation was that I had a client running Umbraco 6.0.5 who needed to upgrade to 7.3.6 (the latest stable release at the time of upgrading).

So I followed the standard Umbraco method, overwriting my /bin, /config, /umbraco, and /umbraco_client folders, and merging my web.config file. For this major upgrade, I also had to overwrite my Web.Config in the /Views directory and the Global.aspx file in the root.
Umbraco 6.0 was still running in .NET 4.0, whereas v6.4+ are all build on .NET 4.5.

I tried numerous ways of getting the various parts updated and then building the solution, installing nuGet packages up to my eyeballs, rebuilding, only to find that Umbraco would then throw is own set of errors and YSODs once I got the thing in a browser.

In the end, I gave up on this rather fruitless approach and decided instead to create a brand new solution with the Umbraco 7.3.6 download files only, and then gradually added the parts of the old solution back in. First of all the connection strings in the Web.Config file, and the old Umbraco version number in appSettings > umbracoConfigurationStatus. Then I compared the /config/umbracoSettings.config files using winmerge, and took only the parts that referenced specific settings for my client's site. I copied any dependant dll files to the /bin directory, as well as pulling the controller and model directories across into the new project. Lastly I moved views, css, and scripts across.

After putting it all in place, I fired up the site. Straight away I got an access denied error. No problem though, I knew exactly what this was - source control on the VS project had set all my files to read only, so I just had to reverse this in my file explorer and hit refresh and I was in. Never have I been to happy to see the Umbraco logo!

It was fairly plain sailing from here. The installer upgraded my database without issue and the backoffice loaded up straight away. Getting the front end of the site to do the same was a little more tricky as some of the data types had been changed (due to old plugins being unsupported). Usefully this didn't error in the upgrade, but warned me that these data types would be changed to a read-only label. So I was easily able to go through and recreate them with the correct data types - lots of nice new ones now in the new Umbraco! This wiped out most of my errors, the remaining few were just typing issues - apparently Umbraco 7 is less forgiving of dynamic types, so wherever I had used a GetPropertyValue, it now wanted me to use the strongly-typed method:

Model.Content.GetPropertyValue<string>("my property")

A few of these bad boys to fix and Hey presto, it was up and running better than ever!

 

Other Resources:

Comments

Post your own

There's no more content down here, what's with the crazy scrolling...