I’m an expert now at migrating old Blogger Blogs.
I am now a reluctant expert at migrating Blogger blogs to WordPress. If you have a more “modern” style Blogger blog, it’s very easy to import directly from Blogger using the XMLRPC way. Just navigate to Tools → Import Blogger:
Then authorize Blogger via Google:
And voila, you have access to your Blogger Blog, assuming it’s supported.
BUT IF IT FAILS, YOU NEED A PLAN B
But if it fails, as it does for some folks with older blogs, then you must try the long route. Comments and corrections are welcome on this post. Please feel free to spread the word about this post to those left hanging by Blogger.
Step 1: Export your blog to XML from inside Blogger.
Step 2: Choose “Export”:
Step 3: Click “Download Blog”:
The file produced is a in a special Blogger export xml format. It will be named like
blog-03-02-2010.xml. This file should contain all your posts and comments. It will not contain the images you use on your blog. If you host on your own server via FTP though, you should have all those old images.
Step 4: Convert your Blogger XML to WordPress XML (WXR Format):
But WordPress can’t import this file format, first you must convert the file to the WordPress compatible WXR format. You can use the blogger2wordpress online tool: http://blogger2wordpress.appspot.com/ to do this:
Step 4a. (If online conversion from Blogger XML to WordPress XML fails):
Caveat: if your blog is too large, this may time out or fail. If that’s the case, you need to download the command line version of the tool and run it locally. The project is Google Blog Converters. Download the file
google-blog-converters-r79.tar.gz(as of this writing it’s at version 79, that number may change).
Under MacOS, this .gz file should automatically gunzip itself and leave you with a file named
google-blog-converters-r79.tar. My downloads go to a directory called
Downloads in my home directory, so where I’m working is
/Users/artlung/Downloads. I untar the file by double-clicking on the file in Finder or if I’m already on the command line by running
tar xvf google-blog-converters-r79.tar and get a directory called
Step 4.b: Open Terminal, and run:
You should see:
Now it’s time to run the conversion:
google-blog-converters-r79/bin/blogger2wordpress.sh blog-03-02-2010.xml > wordpress-blog-03-02-2010.xml
Assuming the conversion worked,
ls should now show the following files in your
That XML conversion is the hard part. I’ve not had it fail on me doing it that way, but if it is, you may want to check the README.txt file distributed with the blog converters tool.
Step 5: Import WordPress to WordPress:
This is covered pretty well in the document Importing Content: WordPress on the WordPress site.
Step 5a: If the file fails to import because it’s too large:
If the file is too large, then you can try overriding the various file upload limits under PHP, and WordPress: How to Import a Large WordPress XML File and Override the Default Limits
php_value upload_max_filesize 32M
php_value post_max_size 32M
Read more about these PHP settings (which override the settings in
You can also try setting the max limit constant in your
wp-config.php file, just add this line:
/** Increase max upload limit */
But I’ve had mixed success getting a shared server to respect these various limits. So, yes, here’s another step. Ugh. I know this is ugly.
Step 5b: Remove extra whitespace:
If, and only if your XML file is almost small enough to fit, you can remove the leading whitespace from the XML file. Basically under an editor like TextMate you can do a search for
^ + and replace with nothing to remove the leading spaces.
But that may not help enough. In which case it’s much uglier still.
Step 5c: Break up the XML file into segments small enough to fit on upload:
Really, WordPress should support importing a file you can FTP into its upload space, but I can’t find a tool or hack that allows for that.
wordpress-blog-03-02-2010.xml we have can be broken up. To do this you need to edit the text file (XML is just a text file). The way I did it was to make multiple copies of it, named like this:
The nice thing is that for each
element in the WordPress WXR file, there is an element named
. The numbering starts at 1 and in my example goes to 230. So remove everything between and including
for the numbers not in the filename, and resave each file. So in the first example I removed
wp:post_id values greater than or equal to 76.
Assuming each file is under your upload limit, each one can be uploaded the normal way in the WordPress Dashboard: Tools → Import → WordPress. If the files are still too large, you will have to break them up further. Be cautious with the formatting in the XML or you will lose posts.
Now, this does not cover the ways to manage your images, converting your permalinks to a new format to assure old links to your site work, the best way to install WordPress, how to convert a blogger theme to WordPress, or how to assure you have archives pages work and redirect correctly. If there’s call for it, I may write those up as well.
Best of luck!