Leaving Blogger – How

by Bill Ferris on December 26, 2005 · 0 comments

in Blog Software,Blogging Tools,Case Studies

Earlier I posted about my reasons for moving from Blogger to WordPress. Now I’ll discuss some of the steps I took to make the transition. I planned to go into considerable detail, but seeing as how WordPress 2.0 offers additional support for importing from various platforms, I’ll keep it brief.
Wordpress ships with a script that will import from Blogger. What the script didn’t do was insure that permalinks would remain the same. It also didn’t import comments. Fortunately, people way more talented than myself took the initiative to fix both the former and the latter.

The first step I took was to setup a subdomain to install WordPress to. I didn’t want to be working in the same directory as my live site. If you’re using Blogspot to host your blog, you wouldn’t need this step. You would however need to secure web hosting in the first place. After setting up the subdomain, and installing WordPress it was time to configure Blogger. This involved changing the template (backing up the old one first of course), and changing publishing and date formatting options. Once the options were configured correctly, I published the blog to my new subdomain (test.detroittigersweblog.com). Immediately after the publish was complete I restored Blogger to my original settings. This isn’t completely necessary, it was just my own paranoia about forgetting what my previous settings were.

Fortunately, it appears that in 2.0 the import script handles the Blogger configuration for you. I haven’t tried it yet, but it appears that you simply provide WordPress with your Blogger login information and it does the rest.

Once the blog was published to the subdomain it was time to tweak the import script. If you aren’t a programmer, I’m not sure what to tell you. It’s hard to say whether or not you’ll feel comfortable editing the script or what the results will be. I’m not a programmer, but I do have some programming experience. While I can’t write PHP, I was able to at least discern what the script was doing.

I didn’t run into any problems with editing the script, or performing the import. Where things got interesting was getting everything working afterwards.

First, my dotcomment import wasn’t very successful. What happened was that any comments that had an apostrophe didn’t get imported. This proved to be pretty easily correctable. I simply edited the script to remove the part where the posts were written into the database. I then added a single line of code to the comment importing script called addslashes that handles special characters like apostrophes.

With the comments imported, I checked to make sure that the website functioned, and that older links still worked. While the website functioned, the old permalinks didn’t work. Because I was using dotcomments in the past my pages all had a .php extension. The script I’d used to preserve permalinks had been written to accomodate .html extensions. As a result, all my post names included .php (or posttitle.php). Now I’m not sure why this worked, but I found that by changing posttitle.php to posttitlephp all my old links worked, as well as the newly created internal links. Fortunately I was able to just run an update query on the MySQL database to make the changes across all posts.

Now I hope I haven’t turned you off to migrating. There were some technical hurdles to overcome, but mine was a somewhat unique case where I had to combine a couple of workarounds. If you have been using Bloggers native comments, the process will probably be much smoother for you. The same is probably true for Haloscan comments. Also, if you have a newer blog with only a few backlinks, the permalink issue probably isn’t as important. At the same time, I wanted to highlight that it might not be a smooth transition and there might be things to overcome. Even with my problems, it only took me about 5 hours to do everything. And that includes virtually no knowledge of PHP, but some knowledge of working with databases.