The Goal: Your current blog at abc.blogspot.com is hosted on the Blogger platform but you now want to move this blog from Blogger to WordPress (self-hosted) with a personal domain name (say abc.com).
The Problem: WordPress.org provides an easy option to automatically import all your old blog posts and reader comments from Blogger into your new WordPress blog but there are still some bigger problems that are hard to ignore:
The Solution: Now that you are aware of the various issues associated with moving sites from Blogger to WordPress, the very good news is that there exists a simple solution to deal with all these problems in one go. Remember you have to choose best hosting services providers in order to migrate to wordpress.org.
You can quickly and safely migrate any blog from Blogger to WordPress without losing RSS Subscribers or human visitors and there’s also a way to pass all that Google Juice from the old blogspot.com address to your new WordPress blog.
Important: Before you implement anything, it may be a good idea to run through these steps on a dummy blog first. Also, backup your Blogger blog including the XML template, posts and comments just to be the safe side.
Step 1: In case you haven’t done this already — register a new web domain, buy server space from some web hosting company* that offers PHP / MySQL hosting and and install WordPress software on your new domain.
*This site is hosted on Dreamhost.com but there are other good hosting options like GoDaddy, Blue Host, Media Temple and Knowhost — most services offer one-click WordPress installation so you don’t need the help of a geek.
Step 2: Go to your WordPress Admin Dashboard -> Tools -> Import and select the Blogger option. Authorize WordPress to access your Google Account and within minutes, all your old blog posts and comments will be available on the new WordPress site.
Step 3: Copy this file into your WordPress themes directory and then rename the file from blogger.php.txt to blogger.php. You may use either Putty with wget or Web FTP to access your WordPress themes directory located on the web server. For credentials and other details, check your cPanel.
Here are the contents of that file.
<?php
/*
Template Name: blogger
*/
global $wpdb;
$old_url = $_GET[‘q’];
if ($old_url != “”) {
$permalink = explode(“blogspot.com”, $old_url);
$q = “SELECT guid FROM $wpdb->posts LEFT JOIN $wpdb->postmeta “.
“ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) WHERE “.
“$wpdb->postmeta.meta_key=’blogger_permalink’ AND “.
“$wpdb->postmeta.meta_value=’$permalink[1]'”;
$new_url = $wpdb->get_var($q)? $wpdb->get_var($q) : “/”;
header (“HTTP/1.1 301 Moved Permanently”);
header(“Location: $new_url”);
}
?>
Step 4. Open your WordPress dashboard and go to Pages -> Add New Page. Keep the title and URL of that page as blogger and select “blogger” from the Template drop-down. Save. There’s no need to add any content to this page.
Step 5. Open the template generator, type the full address of your new WordPress blog (including http:// and the trailing slash) and this tool will create a new classic template for your blogspot blog that will look something like this.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en” dir=”<$BlogLanguageDirection$>”>
<head>
<title><$BlogPageTitle$></title>
<script type=”text/javascript”>
<MainOrArchivePage>window.location.href=’http://labnol.org/'</MainOrArchivePage>
<Blogger><ItemPage>
window.location.href=’http://labnol.org/blogger/?q=<$BlogItemPermalinkURL$>’
</ItemPage></Blogger>
</script>
<Blogger><ItemPage>
<link rel=”canonical” href=”http://labnol.org/blogger/?q=<$BlogItemPermalinkURL$>” />
</ItemPage></Blogger>
</head><body>
<div style=”border:#ccc 1px solid; background:#eee; padding:20px; margin:80px;”>
<p>This page has moved to a new address.</p>
<h1>
<MainOrArchivePage><a href=”http://labnol.org”><$BlogTitle$></a></MainOrArchivePage>
<Blogger><ItemPage>
<a href=”http://labnol.org/blogger/?q=<$BlogItemPermalinkURL$>”><$BlogItemTitle$></a>
</ItemPage></Blogger>
</h1>
</div>
</body></html>
<!– replace labnol.org with your WordPress site URL —>
Step 6. Open your Blogger Dashboard -> Layout -> Edit HTML and choose “Revert to Classic Blog”. Copy-paste the template generated in Step 5 in the “Edit Template” area and click “Save Template Changes”.
Your are done. Open any page on your old Blogger blog and it should redirect you to the corresponding WordPress page. On the WordPress side, since we are using a permanent 301 redirect with the redirection URLs, all the Google Juice will probably pass to your new WordPress pages with time.
Update your RSS Feed: When you move from Blogger to WordPress, the address of your RSS feed will change as well. Go to Blogger -> Settings -> Site Feed, type the address of your new WordPress RSS feed here and Google Reader, Bloglines, etc. will automatically move to your new feed. Check this FeedBurner FAQ for some more ideas.
Now that your new WordPress site is up and running with all the old Blogger posts, here are a few important things you should do: