Moving from Blogger to WordPress: Best Practices
If you’re interested in why moving your blog from Blogger to WordPress is a good idea, look no further than Anita Campbell’s write-up. Once the birth pains of the transition are over, there are no real drawbacks besides lost PageRank from your Blogger blog—if you published on BlogSpot and can’t transfer that Googlejuice to your new host via a real 301 redirect.
Note: If you’re self-hosting your Blogger blog, check out Maintain permalinks moving from Blogger to WordPress by Justin Watt. If you need to convert from Blogger Beta to WordPress, check out this tutorial. My tutorial below does not work for Blogger Beta.
This is what you need to play:
- A Blogger-driven weblog
- A fully installed version of WordPress 2.0+ (it has the nice import utility)
- A basic text editor – Notepad will do
- Some technical know-how (or an adventurous spirit), because I’m not going to hold your hand
What this will and will not accomplish
- Will redirect visitors no matter what their browser situation
- Will redirect them to the best, most relevant page on your new WordPress blog
- Will not preserve PageRank from your BlogSpot blog to your new blog. This would require a 301 Permanent Redirect and access to the server, not provided by Blogger.
- If you publish using Blogger to a remote location using FTP/SFTP, you may be able to preserve PageRank. However, I’m not going to cover that here. You will need to research 301 redirection from your Blogger server to your WordPress server using 301 redirection.
Here’s what we’ll be doing today, kids:
- Saving the Blogger template
- Backing up data from Blogger
- Import data from Blogger into WordPress
- Prepare the WordPress host for redirects from Blogger
- Modify the Blogger template to include redirects
Some of this is based on a tips page from Quick Online tips.
Step 1: Save the Blogger template
Click the Template tab, highlight the text, paste it into a text editor and save it.
Step 2: Back up data from Blogger
Follow Blogger’s detailed directions on backing up your data. (In essence, you change your template to post a text file of all your entries to the homepage of your site.) It’s a little wonky; I couldn’t get the backup to work with comments, so I just backed up entries.
Step 3: Import data from Blogger into WordPress
This is the coolest step. :) WordPress 2.0 has a straight-up slick import utility for Blogger. Go into the WordPress admin area, select the Import tab, select Blogger as the type of blog you’ll be importing, and follow the directions. Looove it.
Step 4: Prepare the WordPress host for redirects from Blogger
Credit a file in a text editor called
from_blogger.php and put the following into it. Wherever there is the text
http://www.yoursite.com/blog/, replace it with the root location of your WordPress blog!
This file will take the redirect from Step 5, parse the URL that’s being passed from Blogger, and redirect the user to the corresponding imported entry on WordPress. If it can’t find the corresponding entry, it directs to the root of the blog.
Put this file somewhere on your WordPress host. If you don’t want to modify anything else in this tutorial, put it at
I owe this section partially to Owen Barder. (I say “partially” because his code had formatting issues and a big typo that I spent a long time trying to debug, and therefore I’m not giving him all the credit. :)
Step 5: Modify the Blogger template to include redirects
Remember the text file with the Blogger template from Step 1? Open it and Save As with a new filename. We’ve got a couple of things to add.
- Immediately after the opening <Blogger> tag, add the following:
This will redirect to the root of your new WordPress blog if the users come to a main or archive page on your Blogger site. If they come to the page of an individual blog entry, it will redirect them to the
from_blogger.phpscript, where we’ll try to pass them along to the appropriate location in the new WordPress blog.
- Add the following in the <head>:
<meta http-equiv="refresh" content="5;url=http://www.yoursite.com/blog/" />
<div style="position: absolute; top: 30px; left: 30px; border: solid 2px #333; color: #000; background-color: yellow; padding: 5px; width: 350px; z-index: 5;"> <p><strong>My blog has moved! Redirecting...</strong></p> <p>You should be automatically redirected. If not, visit <a href="http://www.yoursite.com/blog/">http://www.yoursite.com/blog/</a> and update your bookmarks.</p> </div>
- Fully republish your Blogger blog.
It’s always a good idea to test! However, it can be tricky in this situation you’ll be immediately redirected from your old blog to your new blog as soon as your visit, getting the same treatment as your visitors.
- In Internet Explorer, go to Tools > Internet Options > Security > Internet Zone > Custom Level… > disable “Active Scripting” (under Scripting).
Now try the following tests:
- Go to the homepage of your old blog. You should be redirected in 5 seconds to the homepage of your new blog.
Well, there we have it! We backed up our template and our data first, but then we created the world’s friendliest redirects from Blogger to WordPress so users with bookmarks to old entries get shot right over to the appropriate entry on our new website. Hooray for beer!
I imagine that some of you won’t get this right on the first try, but please try to be self-sufficient before posting questions here. I’ll be very hesitant to even respond. There are lots of other resources on the Web about how to do the Blogger to WordPress migration; I just thought I’d post my experience.