Tales from the Evil Empire

Bertrand Le Roy's blog

News


Bertrand Le Roy


Add to Technorati Favorites Tales from the Evil Empire - Blogged

Blogs I read

My other stuff

Archives

Migrating a blog from Orchard 0.5 to 0.9

img_0338My personal blog still runs on Orchard 0.5, because the theme that I used to build it is not yet available for more recent versions, but it is still very important for me to know that I can migrate all my content and comments to a new version at any time.

Fortunately, Nick Mayne has been consistently shipping a BlogML module a few days after each of the Orchard versions shipped.

Because the module gallery for each version is behind a different URL and is kept alive even after a new one shipped, it is very easy to install the module for both versions.

Step 0: Setting up the migration environment

In order to do the migration, I made a local copy of the production site on my laptop (data included: I'm using SQL CE) and I also created a new local site with a fresh install of Orchard 0.9.

Step 1: Enable the gallery feature on both versions

From the admin UI, go to Features and locate the Gallery feature under "Packaging". Enable it.

Enabling the gallery

You may now click on "Browse Gallery" on the 0.5 instance and "Modules" under "Gallery" for 0.9:

Browse GalleryModules

Step 2: Install the BlogML module on both versions

From the gallery page, locate the BlogML module and install it. Do it on both versions.

The BlogML module from the Orchard Gallery

Then go to Features and enable BlogML under "Content Publishing". Do it on both versions.

Step 3: Export from the 0.5 version

Click on "Manage Blog" then on "Export using BlogML" from the 0.5 version.

Exporting

The module then informs you of the path of the saved file:

The path to the saved file

Step 4: Import into the 0.9 version

From the 0.9 version, click "Import under "Blogs". Click the button to browse to the file that you just saved from 0.5. Then click "Upload file and Import"

Importing

Step 5: Copy the 0.5 media folder into 0.9

Copy the contents of the 0.5 version's media folder into the media folder of the 0.9 version. Once that is done, you can delete the "Default/Blog Exports" subfolder.

Step 6: Configure the target blog

Click "Manage Blog", then "Blog Properties" and restore any properties you had on the source blog. For me, it was the title and URL as well as to set the blog as the home page and show it on the main menu:

The blog properties

Step 7: Republish the new site to the production server

Once this is done and everything works locally, you are ready to publish to the production site. I use FTP.

The imported site

Note: this should work just as well for any couple of versions for which the BlogML module exists, and not just for 0.5 and 0.9.

Comments

Pekka said:

Did you actually publish from Visual Studio using FTP or by separate FTP client?

# December 28, 2010 2:18 PM

Nicholas Mayne said:

Awesome stuff, I'm glad the module helped you to migrate quickly!! :)

# December 28, 2010 3:00 PM

Bertrand Le Roy said:

@Pekka: I use Filezilla.

# December 29, 2010 12:58 AM

Jonathon Kresner said:

When will Orchard support custom themes? I would like to migrate my site soon.

# December 29, 2010 12:38 PM

Bertrand Le Roy said:

@jonathon: custom themes have been supported for several versions.

# December 29, 2010 12:53 PM

Mark Mitchell said:

Thanks for the write-up Bertrand!

Do you think there will be any issues copying over my custom theme from 0.8 to 0.9?

Should I rerun the commands to generate the folder structure from the ThemeEngine theme first?

# January 1, 2011 9:15 PM

Bertrand Le Roy said:

@mark: you should be fine. Just copy your theme's folder over. Few things changed since 0.8.

# January 1, 2011 10:51 PM

Mark Mitchell said:

Migrated per your instructions. Copied the theme folder over and everything worked great. Haven't found any bugs so far, all the previous ones I had noticed seem to have been fixed, and much faster!

Thanks!!

# January 8, 2011 10:19 AM

weblogs.asp.net said:

Migrating a blog from orchard 0 5 to 0 9.. Dandy :)

# March 30, 2011 5:52 AM