Migrating a blog from Blogger to WordPress

by Shijaz Abdulla on 30.12.2009 at 11:56

 I have finally moved my blog from Blogger (Blogspot) to WordPress with zero downtime and zero search engine reputation loss (pagerank). I thought I’d share the process I followed here.

Here are the main steps involved in Blogger-to-Wordpress migration:

  1. Setting up WordPress
  2. Setting Permalinks structure in WordPress
  3. Preparing your Blogger blog for export
  4. Importing posts & comments from Blogger
  5. Fixing your permalinks
  6. Using Windows Live Writer with WordPress

In my case the domain name is not changing, only the blogging platform is. Depending on your scenario, you might need to purchase a domain and/or hosting. If you need help, post a comment to this post.

Part One: Setting up WordPress

There are two kinds of WordPress blogs you could have – WordPress.com or WordPress.org. WordPress.com is the free, hosted blog solution, while WordPress.org lets you download the WordPress software for your own hosting/server. The second option is recommended because it gives you FTP access to your server, and this is required in step 5.

I took Deluxe WordPress Hosting from GoDaddy, and it came with WordPress pre-installed, with tons of themes and plug-ins to choose from.

In order to prevent downtime during the migration, you should configure a CNAME on your existing blog’s domain and associate it with the WordPress blog. For example, if your blog is at microsoftnow.com, make the WordPress blog at temp.microsoftnow.com. This way visitors to your Blogspot blog will not be affected till you are done with the migration.

Also make sure you set the domain/blog URL to temp.microsoftnow.com in the WordPress admin page.

Once you’ve acquired your WordPress hosting, you have to create an empty blog on it with the same name as your blog. This will be the blog to which you will import your posts to.

You will also have to find an identical theme for your WordPress blog and apply it.


Part Two: Setting Permalinks structure in WordPress

This is important so that your permalinks remain intact when you import from Blogger. On your WordPress dashboard, go to Settings > Permalinks.

Choose custom structure, and enter /%year%/%monthnum%/%postname%.html

Hit the Save Changes button.


Part Three: Preparing your Blogger blog for export

It’s important to understand that when WordPress imports posts from Blogger, it uses your Blogger blog’s feed. Hence, you will have to remove any headers/footers from your feed so that these wont show up in your posts on WordPress.

To check and remove if you have any feed footers, go to Dashboard > Settings > Site Feed, and clear the Post Feed Footer field:


Part Four: Importing Posts & Comments from Blogger

  • On the WordPress admin console, go to Tools > Import


  • Choose Blogger


Click Authorize. You will be asked to login to your Google account and grant access to WordPress so that it can pull content from Blogger. Click Grant Access.


On the next screen, you will be presented with a list of blogs on your Blogger account. Click Import next to the blog that you wish to import.

The import process will begin:


You will see the import progress above. In case the import process stops halfway, hit the Continue button to continue importing. Even if you repeat the import process altogether, WordPress will ignore the posts it has already imported and there will be no duplicates.

Another important point to note: The DNS setting for the old blog should not be changed till the import process has completed. If you changed the DNS setting for the old blog before import, the import process will fail with the error “Nothing has imported. Had you already imported this blog?

Once all posts and comments have imported, verify it by browsing them on your WordPress blog.


Part Five: Fixing your permalinks

Even though I set my Permalinks in WordPress in Part Two, this was not 100% compliant with Blogger permalinks. Blogger has a way of shortening your blog’s title in the permalink, while WordPress just puts the whole title in the permalink.

This is where I found an ingenious workaround from Rahul Bansal’s blog. He has written this awesome PHP file, that converts the Permalinks on all your imported posts so that it will be identical to that of Blogger. I am reproducing his code here for your convenience:

<?php require_once(‘wp-load.php’);

$res = $wpdb->get_results(“SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = ‘blogger_permalink'”); $wpdb->print_error();

foreach ($res as $row){

$slug = explode(“/”,$row->meta_value);

$slug = explode(“.”,$slug[3]);

$wpdb->query(“UPDATE $wpdb->posts SET post_name ='” . $slug[0] . “‘ WHERE ID = $row->post_id”); $wpdb->print_error(); }

echo “DONE”;


All you need to do is paste this code in a new file, and call it FIX.PHP. Upload this file on your WordPress hosting, and execute it from your browser – http://blog.mydomain.com/fix.php . You will receive a confirmation “DONE” if all is well. If not, try contacting Rahul.

Now you can finally change the DNS settings on your domain so that your new WordPress blog will be active.

Part Six: Using Windows Live Writer with WordPress

Before you can use Windows Live Writer with WordPress, you need to enable XML-RPC.

On the WordPress dashboard, go to Settings > Writing. Enable the checkbox next to XML-RPC.


Notes/Things to Remember:

  • Do not delete your Blogger blog. Your images are still on Picasa, which is used by Blogger to upload images in your posts. Your WordPress blog still pulls those images off Picasa. As of today, I have found no reliable method to migrate images across.
  • If you have an Outbrain widget for Ratings, you just have to install the WordPress widget. As long as your blog’s URL has not changed, your ratings will remain. If your blog’s URL has changed, you need to contact Outbrain support and they will manually merge your ratings for you.


Trackback Permanent Link

7 Responses to Migrating a blog from Blogger to WordPress

  1. Pingback: Blogger to WordPress Conversion FTP Migration Procedure | minhtriet79it

Leave a Reply