Converting Blogger (blogspot) to Wordpress

I just recently made this switch for a number of reasons but for this post I want to concentrate on the exact steps taken.  I thought the switch was going to be a huge task but in the end I found out that most of it is automated and the whole switch took less than a couple of hours (creating a custom theme and tweaking all the settings and plugins much much longer).  I had some pretty good page rankings with Google and a week later I can now confirm that my blogs search rankings converted over cleanly.

Step 0 – Blogger Custom Domain

I call this step zero because I had already been running my Blogger blog with a custom domain.  If you do not have a custom domain setup with your Blogger account then some of these steps won’t apply (3,9) and you will lose your page rankings.

Step 1 – Install Wordpress

I installed Wordpress myself on my own hosting account.  I can’t guarantee these steps will work for an account hosted at wordpress.com or with something like a one-click install your hosting company may provide.

Step 2 – Import Blogger

Wordpress has a great import tool built-in.  In your Wordpress admin interface navigate to Tools->Import->Blogger and follow the steps.  It uses openauth to connect with your Blogger account.  Follow the steps and you should be all set.  You can read more about it here.

Step 3 – URL Names

This is the most complicated step, but it’s still easy.  In your Wordpress admin interface go to Settings->Permalinks and select ‘Month and name’ .  As Blogger creates URL names slightly differently from Wordpress (for example Blogger limits the number of words allowed in a URL where as Wordpress doesn’t) you’ll need to make sure both URL names match in all cases.  Installing this plugin should do the trick (I did it manually so I can’t vouch for it).  This article also talks about how to fix the ‘.html’ extension that Blogger adds.  As it says you can go back into your permalinks settings and alter how your posts are published to end with the ‘.html’ extension, however I preferred to stick with the Wordpress default setup and opted to add the mod_rewrite entry to my .htaccess file.  I also added the archive entry to convert those old links to the new system.  Make sure you add the block outside of the Wordpress section (if you add it to the Wordpress section it will eventually get deleted), my .htaccess file now looks like:

# BEGIN Blogger URL RewriteRewriteEngine On
RewriteBase /
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)\.html$ $1/$2/$3/ [QSA,R=301,L]
RewriteRule ^([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [QSA,R=301,L]
# END Blogger URL Rewrite

# BEGIN WordPress
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
# END WordPress

Step 4 – Your comments

This is probably the toughest loss during the conversion.  Whilst the import tool works really nicely and maintains all the comments it doesn’t maintain their email association, effectively leaving every comment your blog has ever had as anonymous, so if your blog is super active and has tons of comments going back years this might be a deal breaker.  I didn’t have a ton of comments so it didn’t bother me much, what I did do was go through the comments in the admin interface and update all the comments I had posted myself so at least they were re-associated with me.

Step 5 – Links linking back to blog

This step is only relevant if your domain name or file path will change.  I myself did this step manually as I was working with a fairly small blog and I knew I hadn’t inter-linked too many times throughout my posts, so it didn’t take me long.  However for a large blog I’m sure there is a plugin out there already, or you could probably write a plugin to accomplish this in a few lines of code.

Step 6 – Categories to Tags

In Blogger we had “Categories” but we didn’t have “Tags”, or at least I didn’t use them, after the import I only had categories not tags.  As I wanted to use the tag cloud widget I needed to convert my categories to tags.  There may be a plugin to do this automatically but I just went ahead and did it manually, I went through all my posts and copied and pasted the categories into the tags field within the Posts->Quick Edit in the admin interface.  Couldn’t have taken more than 10 minutes once I was in the flow, but then I was moving a smaller blog.  If your blog is huge you may wanna try and find a plugin to do this or write one yourself.

Step 7 – Styling old posts

If you have switched designs during the switch you might find that a lot elements within older posts now clash with that theme.  For example my old theme had a light background whereas my new theme has a dark one, so as I looked through old posts I found styled content that totally clashed or was even unreadable.  If you have done a good job with using CSS classes to style your Blogger posts then this step will be very easy as it just involves bring over those class declarations into your Wordpress styleguide and altering their properties to match your new theme, otherwise you’ll have to go through your old posts and find those elements and style them (now will be a good time to create those CSS classes so you can get this step done much quicker and have those styles for your new posts moving forward).  For this step I also went through all my posts with code examples and converted them to use the amazing SyntaxHighlighter.

Step 8 – Feedburner and Google Analytics

It’s almost easy to forget but these steps are hugely important.  In the case of Feedburner I was disappointed to find that I’d named my feed something very closely tied to the name of my old blog, but as part of the switch I was coming up with a fresh name and domain.  So what I decided to do was create completely new feeds that point to the new site (use the Wordpress Feedburner plugin) and leave the old feed intact but point it to my new feed, hopefully eventually Feedburner will tell me the old feed is no longer followed at all and then I can delete it.  For Google Analtyics I decided to create a new profile, but I guess you could just change the domain  in your current profile (if necessary I suggest you do this immediately after you have flipped the switch), then use this plugin that will take care of adding the google code to your template footer (but not when in preview mode for example).

Step 9 – 301 redirect

This is the final step and once you take it your old blog is dead!  Actually not quite true, your blog will live on in Blogger until you delete your account.  I had my own custom domain setup and thinking about it now I don’t know how you’d complete this step without it, I had a subdomain dns cname entry pointing at the google dns server.  So I did the following (all very quickly as once started your blog is down until you finish): logged into blogger and switched back to blogspot.com hosting, in my dns settings I deleted the cname entry, I then created the hosted domain of the cname I just deleted so I could serve up the following .htaccess file:

redirect 301 / http://www.richie-p.com/blog

Now I have this lovely Wordpress blog!

Tags: WordPress

Leave a Reply