How to Migrate Blog Post Images from BlogEngine to WordPress

I recently migrated my entire blog to a new host and a new blogging platform. While doing the transition, I took notes, analyzed my options and made the jump from BlogEngine to WordPress just last weekend. This post addresses one problem I encountered along the way.

One problem I encountered while performing migration tests from BlogEngine to WordPress were the image references in the posts. Left unaccounted for, any post images on WordPress after the migration will be using a reference that was good for BlogEngine but fails for WordPress. So something needs to be done to them unless you don’t mind redoing each and every post that contains an image in it. I know I don’t want to waste that time, so here’s how I worked around this little problem.

The Problem

In BlogEngine image references look like this:

domainname/image.axd?picture=WindowsLiveWriter/some-folder/some-image.jpg

In WordPress, an image reference looks like this:

domainname/wp-content/uploads/2009/06/some-image.jpg

After you migrate your blog from BlogEngine to WordPress using the BlogML import tool in WordPress, all images will be referring to image.axd and not wp-content. So how can we fix this problem? Easy, we need to modify the BlogML data file before we upload it into WordPress. So let’s have some fun and perform a little string surgery.

The Solution

There’s an easy fix for this, and all it requires is identifying where the physical images are and modifying the references in the BlogML data file.

BlogEngine stores the image files for posts within the App_Data\Files folder. I happen to use Windows Live Writer, so all of my images went even further into another folder. So why am I explaining all this?

These files will need to be FTP’d to the destination host and placed under your /wp-content/uploads/ folder. You can move these ahead of time and have them sitting there waiting for you to perform the import process. Just grab the root-most folder that contains the images and move them over to the new host.

Once the files are on the new host, give one a test to make sure that you can still access the images you want. Just type in a direct reference like http://www.waynejohn.com/wp-content/blah blah/someimage.jpg into a browser, and it should come up if everything is alright.

Plus, once you have the image reference in the browser, you can refer to it while performing a quick find/replace operation in your favorite text editor. If the domain name is changing, include a quick sweep for your domain name also, as part of the string surgery. Just in case. You never know.

Here are the steps to migrate your BlogEngine post images to a WordPress blog.

  • Find the root image folder and FTP the folder and all it’s contents to the /wp-content/uploads/ folder.
  • In the BlogML data file, replace all instances of “/image.axd?picture=” with “/wp-content/uploads/” in the BlogML file.
  • Perform any other string manipulation operations you’d like to perform in the BlogML data file.
  • Import the BlogML data file to WordPress

That’s all there is to it. At this point you should be able to view your WordPress blog and see that the post images are indeed there and they are pointing to a reference located on your WordPress host. Everything should be looking good, as far as post images are concerned.

If you see any way to make this more effective or easier, let me know. Unfortunately the BlogML does not include the code it would need to migrate the images. At least not that I was able to discern, but I didn’t go digging in it either. Perhaps the process would add too much overhead, but I’m sure there are ways around that.

It would make things so much more easy, and this post completely unnecessary. So I guess I should just keep my trap shut.


You might also enjoy these related posts

  1. Updated BlogML Import Class for WordPress When you export all your post data from BlogEngine and try to import the data file into WordPress using Aaron Lerch’s BlogML import class, I found that it does not...
  2. WayneJohn.com is Migrating From BlogEngine to WordPress Sometime this week I’m migrating this blog from BlogEngine to WordPress. It’s been given a lot of thought, and I’ve spent many hours pondering the pro’s and con’s of migrating...
  3. Why I Decided To Migrate to WordPress I recently announced that I'm migrating my blog over to WordPress, and I thought that there might be some benefit to others if I explained how I reached this decision....
  4. Is your blog DoFollow? Here are some great images to let your visitors know! I’ve found a new blogger recently that blogs at ExtremeJohn.com and is giving away free dofollow images for you to use on your blog. Pretty damn cool if you ask...
  5. The Migration to WordPress is Complete Over the weekend I followed through on my plan to migrate my blog over to WordPress.  My migration is now complete, for the most part. I spent most of my...

About Wayne

Wayne John is a web developer in Southern California that shares his 25+ years of programming and web development experience freely and happily to anyone willing to learn. He also loathes speaking in the third person. If you enjoyed this post, make sure you subscribe to my RSS feed or get updates in your email.
This entry was posted in Blogging Help & Tips and tagged , , , , , . Bookmark the permalink.

7 Responses to How to Migrate Blog Post Images from BlogEngine to WordPress

  1. ikaran says:

    Wayne,

    I’m looking to migrate from blogengine to wordpress as well.

    How did you fix those blogengine urls that have been crawled by google? I am on IIS7 and PHP5

    thanks

    • Wayne - Twitter:
      says:

      For every URL that you want to accommodate, you’ll need to specify a 301 redirect. Here’s a nice doc that covers most web servers: http://www.webconfs.com/how-to-redirect-a-webpage.php

  2. Vanea Bell - Twitter:
    says:

    :’( Oh!… Is hard… After so much time… I feel like i have no words! How are you my dear Wayne?! WordPress??… It’s a very big change! If it was in your advantage i congratulate you! But, even so, i feel my heart broken, seeing this ugly theme… :’( I guess that i’m used to see your old and forever alive in my heart, Blog Engine theme… :-( Sorry, Wayne! I guess that i must be very happy for you!… Sorry, also, for my absence from this little world of yours! But, life is changing and i’ve tried to find few friends from my own country… How is Manz?!… Manz… I must go and salute her too…! :’( Sorry for my spelling, worst than ever before… Nice to talk to you!! :-) Your friend, Bell

  3. Adam Donkus - Twitter:
    says:

    Looks sweet my friend..great job with the transition. Did the link structure change at all?

    • Wayne - Twitter:
      says:

      Thanks Adam!

      Yup, completely. I’ve made several structural changes and made accommodations for those changes. You’ll see a few more posts like this one that describes a certain facet of the migration. This will all be topped off with a review of the process. Should make for a good 5 post mini-series.

      That is, of course, if you are moving from BlogEngine to WordPress, lol

  4. Karen says:

    Seriously, Wayne, you wear me out. I can barely type a blog much less bo anything with it!

    • Wayne says:

      Glad to hear it Karen. Thanks for leaving such an inspiring comment. I think I’ll go try to wear someone else out now. My job here is complete.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled

Enter YourName @ YourKeywords in the Name field to take advantage of Keyword love. Please note, I normally won't approve comments that use products or niche keywords for a name. Get your comment approved, don't be a spammer.