Victor's Blog

Live as if you were to die tomorrow. Learn as if you were to live forever


Upgrade Orchard from 1.6 to 1.8.

Orchard website has the instruction on how to upgrade the website. I found quite few problems when I did my upgrade. Here are how I did my upgrade.

1. Because I always use the Orchard source code and I have few custom modules. First thing is adding my custom modules to the orchard project and making sure everything can be compiled successfully.

2. Assign the Administrator role to your current Super User account if you haven't done that before. You will need an account with the Site Owner permission before you update your website with the new release. Without this step you won't be able to access the dashboard.

In case you are discovering this notice too late, here is the manual operation to apply. In your database table Orchard_Framework_ContentItemRecord, on the record with id=1 (the site content item), update the value with this content <Data><SiteSettingsPart SuperUser="admin"/></Data>

3. Backup your site & database. 

4. Delete Dependencies folder in the App_data except sites 

5. Delete all modules in the Modules folder. This step is not in the instruction. But I found if I didn't do that, I will get an error like "014-04-03 13:10:17,247 [27] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default


System.TypeLoadException: Could not load type 'Orchard.Comments.Services.ICommentValidator' from assembly 'Orchard.Comments, Version=, Culture=neutral, PublicKeyToken=null'."

6. Run the build.cmd in the source folder.

7. When the build process finishes, you can find your deployment files in the folder "build\MsDeploy". Update your current website using the latest deployment files.

8. If everything goes smoothly, you can browser your website now. 

9. Log into your admin console, Enable the media library module.

10. Enable upgrade modules. And upgrade your site content using the upgrade module

11. If you find you lost your menus, that probably because links has been lost during the upgrade. You can re-link content to your menu in the navigation.

12. Everything should be finished. If you verify everything, you can disable the upgrade module.