An Umbraco database upgrade tip from the trenches

Upon trying to help with an upgrade recently, I came across an interesting case: for some reason the site in question was impossible to upgrade, in the upgrade installer, the database upgrade would fail.

By chance, it took a long time to download the actual complete site they were trying to upgrade but I had the database backup on my machine already. Then it occurred to me: I don't really need the website, just the database!

Imagine you're upgrading from Umbraco 7.0.4 to 7.4.2, here's what you do (warning: blink and it's over!):

  • Install a fresh copy of Umbraco 7.4.2 using SQL server
  • When it's done, go into your web.config and:
    • Change the version from 7.4.2 to 7.0.4
    • Change the connection string to point to the database that you want to upgrade (the one that's still on version 7.0.4)
  • Run the upgrade installer that kicks in automatically
  • Done!

Of course you still need to upgrade the actual website with the new files and do your config merges etc, but at least you know that your custom code is not blocking the database upgrade any more.

Told you: blink and it's over!

Sebastiaan Janssen

Dutch guy living in (and loving) Copenhagen, working at Umbraco HQ. Lifehacker, skeptic, music lover, cyclist, developer.


2 comments on this article

Avatar for scott w scott w | December 1 2016 11:23
nice post

Avatar for luis b luis b | March 27 2018 07:31
hey, this sounds like a great idea. I have been trying to upgrade from 6.1.5 to 7.8 for many days with no luck. I have tried this, but I get the error when I try to log in backoffice: "no url found for api name legacytreejs", I've searched in google with no luck, any idea on this?