Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Josip 195 posts 662 karma points c-trib
    Oct 29, 2019 @ 16:46
    Josip
    0

    Upgrade Umbraco in production

    Hello guys I am doing my first Umbraco upgrade on production server.

    What I did:

    I have upgraded localy my Umbraco website via nugget package, after that I run database upgrade localy and than I pushed changes to staging and production server with AzureDevops.

    Now I am not sure is that all or I should upgrade production database, Because after deploying changes to staging and production and visiting www.mysite.com/Umbraco it cant see window for database upgrade.

    I am confused.

  • Jeffrey Veer 41 posts 308 karma points
    Oct 29, 2019 @ 17:55
    Jeffrey Veer
    0

    Hi Josip,

    Are you talking about just an upgrade of Umbraco 8 or a migration from 7? I assume the first.

    After deploying the code changes, including the web.config you should get a notification on your staging and production environment as well, as long as they have an own database of course.

    Are you sure you updated the web.config to staging correctly? As this should have a property with the umbraco database version, which is compared with a value stored in the database to see if migration must run.

    Hope this helps, otherwise let me know and I will try to help you

  • Josip 195 posts 662 karma points c-trib
    Oct 29, 2019 @ 18:02
    Josip
    0

    Hi Jeffrey,

    Yes, I am upgrading from Umbraco 8.2.0 to 8.2.1. I checked version in my production web.config file and its changed to 8.2.1. It looks like this:

      <add key="Umbraco.Core.ConfigurationStatus" value="8.2.1" />
    

    Or I should check some other value?

    Yes, every enviroment have its own database.

  • Jeffrey Veer 41 posts 308 karma points
    Oct 29, 2019 @ 19:04
    Jeffrey Veer
    0

    Hi Josip,

    Yes, that's the value I meant. So the config seems to be fine, can you also check whether the files in the Umbraco folder are updated correctly? We've previously had the same issue which turned out the Umbraco folder was not deployed, because we didn't include the Umbraco folder in source control.

    You can also check the version after login to the Umbraco back-office, to see if for some reason it updated the database already.

    One other thing to check may be the version of the Umbraco dll, to make sure it's 8.2.1.

  • Josip 195 posts 662 karma points c-trib
    Oct 29, 2019 @ 19:45
    Josip
    0

    When i check Umbraco version in Umbraco backoffice it looks like its updated enter image description here

    Does that mean that database is upgraded? Or could be that value coming from somewhere else?

    I am not sure how to check dll version.

    This is my gitignore for Umbraco files:

        # Umbraco
    # Ignore unimportant folders generated by Umbraco
    **/App_Data/Logs/
    **/App_Data/[Pp]review/
    **/App_Data/TEMP/
    **/App_Data/NuGetBackup/
    **/App_Data/cache/
    
    # Ignore Umbraco content cache file
    **/App_Data/umbraco.config
    
    # Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder)
    # Make sure to include details from VisualStudio.gitignore BEFORE this
    !**/App_Data/[Pp]ackages/*
    !**/[Uu]mbraco/[Dd]eveloper/[Pp]ackages/*
    
    # ImageProcessor DiskCache
    **/App_Data/cache/
    
    # Ignore the Models Builder models out of date flag
    **/App_Data/Models/ood.flag
    
    # Ignore Media
    /u_BmeOpensourcing/Media
    

    I saw in some older articles that i could change version number to older version number to manualy triger database upgrade but I am not sure if that is working with Umbraco 8.

  • Jeffrey Veer 41 posts 308 karma points
    Oct 29, 2019 @ 20:04
    Jeffrey Veer
    100

    The version is stored in the database for Umbraco 8 in the table umbracoKeyValue where the key is Umbraco.Core.Upgrader.State+Umbraco.Core. This key is set to {5B1E0D93-F5A3-449B-84BA-65366B84E2D4} for 8.1.0+: https://github.com/umbraco/Umbraco-CMS/blob/6dbb9889035fdc5e5447053787cd315343831f6b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs#L183

    I don't think there should be a problem re-initializing the upgrade from 8.2.0 to 8.2.1 by changing the key in the web.config. However, I think you are good to go with the current installation as it seems 8.2.1 is installed properly.

    Although you won't need this, you can check the version of your DLL by going to the properties of Umbraco.Web.dll and open the details tab. It should then display the version:

    enter image description here

  • Josip 195 posts 662 karma points c-trib
    Oct 29, 2019 @ 20:18
    Josip
    1

    I tried to change version to 8.1.0 in web.config and this time I opened mywebsite.com/Umbraco and Instalation started. I wanted to be sure that i have updated database :)

    I am using plesk control panel on my server but I will try to find the folder with remote desktop control to check that version because i had problems before with dll files when i manualy replaced dll localy and they didnt pushed to the server.

    I think that your answer above is solution, so thank you for your help :)

    BR

    Josip

  • Jason Hinsley 7 posts 98 karma points
    Mar 15, 2020 @ 14:08
    Jason Hinsley
    1

    In case it helps anyone, I had the same issue when upgrading from 8.4.0 to 8.5.4.

    The problem was that when upgrading the site locally (by updating the nuget package in visual studio), I then ran the site locally, which prompted me to upgrade the database. This upgrade, I think, then updated the web.config to the new version.

    <add key="Umbraco.Core.ConfigurationStatus" value="8.5.4" />
    

    When I then deployed this to production, the web.config already states the new version in ConfigurationStatus and so no upgrade prompt was presented (Umbraco thinks the update has already taken place?).

    So, what I did was manually change the ConfigurationStatus version on production back to the old version:

    <add key="Umbraco.Core.ConfigurationStatus" value="8.4.0" />
    

    Refreshed the page and I got the login prompt for upgrade of database on production.

    Once the upgrade had completed, Umbraco updates the web.config to 8.5.4 so it is now back inline with source code.

    Not sure this is the best way, but it got me going. Ideally you should not have to mess with config on production.

Please Sign in or register to post replies

Write your reply to:

Draft