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.

8 Comments

Comments have been disabled for this content.