I've just spent an evening delving into the wonders of Blogger.com and Wordpress, helping someone migrate their blog from the former to the latter. The process should be straightforward enough, sadly it most definitely was not! In summary, there are two parts to this - first getting the Blogger data into Wordpress, then getting each page on the old Blogger site to automatically redirect to the correct corresponding page on the new Wordpress site.
In this post, I've already got Wordpress version 3.3.1 installed and ready to go.
Step 1 - Install The Blogger Importer Plugin
- From the Wordpress Dashboard, look for the Plugins option and click "Add New".
- Search for "Blogger Importer" and install then activate the plugin.
- Select the "Tools" menu, select "Import", then click "Blogger".
- A button should appear marked "Authorise", click this, if you're lucky you'll now get a page with a "Grant Access" button. Awesome, skip step 2 and proceed to step 3! If you instead get a message, "The site [your site] has not been registered.", you'll need to grant access using the process below.
Step 2 - Grant Google Permissions
The following is a hugely abbreviated version of the process over at http://bloggertowp.org/solution-error-the-site-has-not-been-registered-during-wordpress-import/, which includes screen shots, in case you're not sure what you're doing.
- Navigate to https://www.google.com/accounts/ManageDomains
- Add your new blog domain name if necessary
- Click "Manage [your domain.com]"
- A screen should appear with a process to validate that you own the domain, follow this process then click the "Verify" button
- In the Manage screen that should appear, you need to re-enter your domain name in the "Target URL" field, then click Save.
- Retry the import process in step 1, this should now work correctly.
Step 3 - Blogger To Wordpress Redirection
You now have two copies of your blog - your old Blogger blog, and a direct copy on your new Wordpress site. If you're happy with your Wordpress site, you'll want your Blogger traffic to redirect so that your old links will continue to work.
- Back in Wordpress, install and activate the "Blogger To Wordpress Redirection" plugin.
- From the Tools menu, select "Blogger to Wordpress Redirection"
- Click the "Start Configuration" button
- Your Blogger blog URL should appear, click the "Get Code" button to get a code snippet that you can copy-and-paste into your Blogger template (make sure you select a "Classic template" in Blogger!)
If you're lucky, this will just work. You're done!
If you're unlucky, you'll find every Blogger page simply redirects to your new blog homepage, not to the corresponding post. When this happened to me, after a bit of headscratching, I found out it was due to Google's new process of redirecting to regional Blogger URLs, and fixed the problem as follows:
Step 4 - Dealing With Blogspot's Regional Redirect
In step 3 above, the template you put into Blogger will redirect URLs that look like "http://yoursite.blogger.com/url/to/your/post" to "http://www.yourwordpressblog.com/?b2w=http://yoursite.blogger.com/url/to/your/post ". The import process you completed in Step 1 above imports your old Blogger URLs for each post, so the Blogger To Wordpress Redirection plugin can intercept the "b2w" bit of the URL and redirect you to the correct post.
But Google have recently started adding a redirect into the mix. If you hit a Blogger page at "http://yoursite.blogger.com/", Google may decide that you should instead be "http://yoursite.blogger.co.uk/". The data that gets imported from Blogger in Step 1 contains the .com address, the URL that gets passed to your site via that b2w query string variable contains the .co.uk, and the whole thing doesn't work.
The solution is to update the URLs stored in your Wordpress database as follows:
- Note - This process involves running SQL directly against your Wordpress database - if you stuff it up, my heartfelt condolences, but you're doing this at your own risk!
- Open up your database using your front end of choice - in my case I'm using "phpMyAdmin", provided through my web host's control panel.
- If you need login details for your database, you should find these in a Wordpress "wp-config.php" file on your webspace.
- Once you're logged in, run the following SQL (update this to include your correct Blogger blog name and your correct region in case you're not in the UK):
SET meta_value = 'yourblog.blogger.co.uk'
WHERE meta_key = 'blogger_blog' AND meta_VALUE = 'yourblog.blogger.com'
As if by magic, all should now be working!
So that was a fun evening! We now have a fully functional Wordpress blog, with comments, categories/tags, authors, etc. The old Blogger site is redirecting to the new Wordpress site page-by-page, all's well!
Okay, the Disqus comments aren't working correctly for us yet, but that's a problem for another day.