Note: this post doesn't cover BlogEngine.NET installation.
Yesterday I've moved my personal blog (in Russian) from LifeType to BlogEngine.NET.
I've used LifeType blogging platform (formerly know as pLog) since 2003. It's a decent, mature blogging engine for both standalone blogs and multi-blog communities. I didn't move away from it because there's something seriously wrong with it. I just had several minor reasons for the move:
- I have a personal Windows/.NET hosting account, but my blog was hosted on my company's server because of the blogging engine's PHP nature;
- I can do my share of PHP coding but I feel more at home with .NET these days;
- The most frustrating thing and the one which was the main reason for the move and main obstacle - there's no way to export blog content from LifeType into some widely supported format (like BlogML)
In case you are going to follow my path, I want to warn you right away:
- I've lost all comments in the old blog. Since there are no tools to export them and no comment RSS, I decided to sacrifice comments rather than try and create some tool to export them from the MySQL database and then map to the posts in the new blog
- Back links to your own posts will be broken. To resolve this you'd need to make a mapping table of your old and new post IDs and then replace all the links based on that. I decided to skip this
The only readily accessible way to export posts from LifeType is RSS feed. The number of posts in RSS feed is controlled by "Number of recent posts" setting in LifeType. Since we need them all you should set this value to something that is undoubtedly higher than the number of posts in your blog.
Basically one may think that this is it - just feed your feed (sorry) to BlogEngine.NET's Blog Importer and you are set. Unfortunately it's not that simple.
First of all, as of this writing (BE.NET v.1.3), it looks like Blog Importer has problems opening feeds with parameters in the URL. But since LifeType's rss.php can serve default RSS profile (can be set in configuration) this is not a major issue. However, in my case, Blog Importer still choked on my feed. Maybe it was the number of posts (1200) in my blog, maybe something else but it didn't work out that way.
Anyway even if Blog Importer doesn't choke on your feed, you wouldn't want to import your posts that way unless you've never touched LifeType's Resource Gallery. So, we just need to save our full RSS feed content as file by simply downloading it with your favorite download manager. Make sure you set locale of your blog to English US even if your blog is not in English. At least in my case importing with Russian locale resulted in incorrect dates.
You can specify File Path in Blog Importer. Everything under that path is considered a file by it and will be downloaded into your new blog as is and appropriate URLs in your content will be modified accordingly. Unfortunately if you've used Resource Gallery in LifeType most of your images will have an src attribute looking something like this: http://yourdomain.com/blog/resserver.php?blogId=1&resource=someimage.jpg
Setting File Path to http://yourdomain.com/blog/resserver.php? (or something like this) doesn't work. Fortunately the image is physically accessible at http://yourdomain.com/blog/gallery/1/someimage.jpg (I guess this can vary slightly in different installations).
What we need to do is open our saved RSS file and run a replace changing
Now we need to place our static RSS file on the server, because there's no option to load RSS file from disk in Blog Importer. I don't know what MIME-TYPE it expects to get but I was unable to find an extension for it to accept my RSS file. Finally I've changed extension to .aspx and voila, my RSS was finally declared valid.
I've set File Path field to http://yourdomain.com/blog/gallery/1/, entered connection information for my BE.NET blog and pressed Import. In a matter of seconds all my posts were imported into Blog Engine.
However there were still some issues left.
- File Path URLs were replaced with http://localhost/... URLs (I did the import on my local machine which is the only logical approach, imho);
- Author wasn't set on my posts, even though I've tried importing with "Use Source Author" checked and unchecked and usernames in both blogs were identical.
I've solved both of these issues by running a find & replace in files on App_Data/posts/ directory replacing http://locahlost/ with just a slash, and <author /> with <author>ailon</author>. The later wont save you if you had more than one author in your blog.
After that I've just uploaded all the files to my hosting server and everything (except the known issues above) seems to be working fine.
Hope this helps someone.