web 2.0

Migrating From Blogger to BlogEngine.Net

Update: After moving to BlogEngine I started getting a large amount of spam comments. I went through the trouble of implementing captcha and I outlined the steps here.

I recently went throught he painstaking process of migrating my blog from Blogger.com to BlogEngine.NET. Here is a brief walkthrough of the process:

  1. Export the blogger site to BlogML using Aaron Lerch's Poweshell Script. The powershell script produces an XML file which you can use to import all of your posts into BlogEngine.NET through the settings page.
  2. The BlogEngine.NET uses a concept called SLUG which is a relative URL. So if you write an article named "The Chistmas Story" it will produce a relative url of ~/post/the-christmas-story.aspx . Unfortunately the Blogger engine works differently. It removes certain words and punctuations from the URL string. In Blogger the same article would have a relative url of /2009/12/christmas-story.html. You will notice a few main differences here, Blogger uses the year and month as the initial part of the URL whereas BlogEngine.NET uses the path ~/post. Also Blogger removes certain words like "the" and has an html extension instead of an aspx extension. Therefore, after the migration you will want to repair your links so people can still find your articles using the old URLs. The best way to do this is to add some custom code to your error404.aspx.cs page. Basically, when someone tries to access a post on your site using the old Blogger style URLs they will get redirected to the error page. The code in the Page_Load of the error page will then attempt to re-translate the url into a BlogEngine.NET path. In my case, I used a regular expression to find any requests that were looking for 2009 blog posts (because this is the timeframe that I had a Blogger site):
    protected void Page_Load(object sender, EventArgs e)
    {

    string pattern = @"/2009/\d{2}/(?<oldPath>.+).html";
    Match m = Regex.Match(Request.Url.ToString(), pattern);
    if( m.Success) {
    Response.Redirect("~/post/" + m.Groups["oldPath"].Value + ".aspx" );
       }
    ...

    I also did a lot of manual updates to the articles making sure the SLUGs were correct. So if the old URL was /2009/12/christmas-story.html the proper slug for the BlogEngine would be christmas-story. For this part of the project I leveraged google and did a search for all articles on my site using the search string "site:codecapers.com". This produced a list of all the articles previously posted on my site. I then went through each search result, and updated the SLUG to match the old Blogger URLs.
  3. For some reason the powershell script did not maintain my Tags, so I had to go through my articles are re-tag them. I also used this as an opportunity to clean up some HTML and to replace some images that I did not like.


The whole process took about 2 days. If I had more than one year of articles I probably would have taken the time to expand on Aaron's powershell script. However, the overall process was not too bad and I am extremely happy with the end result. I am truly impressed with BlogEngine.NET and since I am a .NET developer it is really easy for me to make changes and customize everything to my hearts content.

Tags: ,

Comments

Sikat ang Pinoy United States, on 12/25/2009 5:43:30 PM Said:

Sikat ang Pinoy

Your website came up in my search and I'm taken by what you have composed on this topic. I am presently diversifying my research and thus cannot contribute further, even so, I've bookmarked your web site and will be returning to keep up with any future updates. Just Now love it and thanks for granting my remark.

Wristbands United States, on 12/27/2009 9:16:07 PM Said:

Wristbands

well christmas is over already, but im looking forward for the next christmas next year.

Aku Cuma Seorang Blogger Yang Cinta Seo United States, on 1/4/2010 7:30:45 PM Said:

Aku Cuma Seorang Blogger Yang Cinta Seo

Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which we all need, thanks for all the enthusiasm to offer such helpful information here.


Florida Search Engine Optimization United States, on 1/5/2010 12:54:27 AM Said:

Florida Search Engine Optimization

Welcome to BlogEngine.. For sure that you will have a great time here. Be sure that your blog is a SEO friendly..

free scholarship info 2010 Indonesia, on 1/5/2010 8:27:37 PM Said:

free scholarship info 2010

Hellow, i just search about BlogEngine.NET resources. You think what is you prefer Wordpress or BlogEngine.NET? Thanks for you respond Smile

me United States, on 1/5/2010 9:56:54 PM Said:

me

I never used wordpress so I can't really comment about it. However, BlogEngine.net is a great tool and I would highly recommend trying it.

Second Hand SNooker table United Kingdom, on 1/9/2010 3:18:25 AM Said:

Second Hand SNooker table

You made the right decision, BlogEngine.Net is so much more robust that Blogger and looks better

Internet Marketing Services United States, on 1/13/2010 12:15:16 AM Said:

Internet Marketing Services

thanks i really enjoy reading your article!!

-Internet Marketing Services

Gate Valves United States, on 1/13/2010 3:19:46 AM Said:

Gate Valves

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

sikat ang pinoy United States, on 1/13/2010 6:15:32 AM Said:

sikat ang pinoy

Your website came up in my search and I'm taken by what you have composed on this topic. I am presently diversifying my research and thus cannot contribute further, even so, I've bookmarked your web site and will be returning to keep up with any future updates. Just Now love it and thanks for granting my remark. Great job and will extend it on to admirers and my web site fans.

SEO Services United States, on 1/13/2010 10:53:54 AM Said:

SEO Services

Most of my friends are actually relying now on blogengine the best.

bathroom tile ideas United States, on 1/14/2010 7:47:32 AM Said:

bathroom tile ideas

maybe the reason why we should migration from blogger to blogengine because blogengine give more easy than blogger

Fullerton Criminal Defense United States, on 1/15/2010 1:15:34 AM Said:

Fullerton Criminal Defense

Happy to see your blog as it is just what I’ve looking for and excited to read all the posts.I am looking forward to another great articles from you..

get paid for surveys United Kingdom, on 1/15/2010 3:58:07 AM Said:

get paid for surveys

Excellent stuff, thanks.

small bathroom designs United States, on 1/17/2010 1:50:14 AM Said:

small bathroom designs

Hi,
Its very greatful for choice BlogEngine.Net as platform your blog. I'm using blogengine too and for me thats easy to manage althought I'm newbie.
happy writing

Regards,
fat

small business ideas for woman United States, on 1/18/2010 1:15:23 AM Said:

small business ideas for woman

does blogEngine support captcha for comments?

bikemodify United States, on 1/18/2010 6:51:26 AM Said:

bikemodify

success sir...
i want to migrating yet...
thanks for sharing

Michael Ceranski United States, on 1/18/2010 7:53:39 AM Said:

Michael Ceranski

Captcha supports asp.net and there are directions on how to configure it here: http://recaptcha.net/plugins/aspnet/

kallam Malaysia, on 1/21/2010 5:59:49 AM Said:

kallam

thanks for the very informative article.i will follow your blog closely.anyway a good SEO is important too.and using BlogEngine.NET is the best way to start a new blog.keep work with good article in this topic.

SEO Services United States, on 1/23/2010 9:06:28 AM Said:

SEO Services

I've been busy recently migrated my homepage (and several others) from classic ASP.

mac tutorial United States, on 1/25/2010 1:41:18 AM Said:

mac tutorial

You posted very informative article that for some reason you got my interest to try this out.

traslochi a milano United States, on 2/4/2010 6:11:19 AM Said:

traslochi a milano

That's great, I never thought about Migrating From Blogger to BlogEngine.Net like that before.

most popular filipino United States, on 2/11/2010 8:10:42 PM Said:

most popular filipino

Hey webmaster, good day. Totally Great work. You have gained a new fan. Please continue this awesome work and I look forward to see more of your excellent posts. Take care.

topsy.com , on 5/1/2010 3:25:34 PM Said:

pingback

Pingback from topsy.com

Twitter Trackbacks for
        
        Code Capers | Migrating From Blogger to BlogEngine.Net
        [codecapers.com]
        on Topsy.com

273.tvshowzone.com , on 5/20/2010 3:11:44 PM Said:

pingback

Pingback from 273.tvshowzone.com

Spirit Coupon, Chrysler 300 Part Dodge Spirit

Comments are closed