/Transfer Blogger to WordPress
blogger to wordpress

Transfer Blogger to WordPress

Blogger is a great blogging tool created by Google that makes the task of blogging really easy. With that said, using Blogger has a few downsides just like any other closed platform. You don’t have full control over your blog. If you have already came to the conclusion that you need to transfer from Blogger to WordPress, this tutorial will take you through the process without losing you hard earned Google rankings.

Sign Up for Wordpress Hosting

Choose a well known WordPress hosting company from the list in the previous link and purchase a domain name. The host that you chose will make it easy to connect your domain name to the host and install WordPress on the new hosting account. Once you have WordPress installed we’ll start to import your Blogger to WordPress.

Export Blogger to Wordpress

In order to move your Blogger blog to WordPress we need to first export the existing blog. When in Blogger navigate to your dashboard and go to Settings » Other and go to the Import & Backup section, click the Back up content button. Now a popup will jump up with a Save to your computer button, click it.

Your content will now be downloaded in an XML format to your computer. Now we need to import your Blogger file to WordPress.

Import Blogger to Wordpress

In order to import the Blogger file to WordPress, navigate to the Import page under Tools in WordPress. On this page there are several import tools, the first one is Blogger to WordPress. Install it.

Import Blogger to WordPress

Once installed click the “Run importer” button, which will get you to this page:

Import blogger file

Click the “Choose file” button and choose the XML file we just downloaded from Blogger. Now click the “Upload and import” button.

Now your Blogger posts are being imported to WordPress. When the importing process is finished, you will be prompted to choose an author for all the posts you have just imported. You can assign your default WordPress user, other existing users or even create a new WordPress user.

The importing stage is completed, however we still have a bit more work to make sure we don’t loose any WordPress rankings.

Permalinks

The premalinks (URLs) in Blogger are built with the month and year in them, so we’ll build our WordPress permalinks accordingly. Within WordPress navigate to Settings » Permalinks and choose the Month and name option.

Redirect from Blogger to Wordpress

The most important step in moving any site in terms of SEO is the redirection. You want the browser to redirect a user that lands on the Blogger page, to its duplicate on your new WordPress site. This serves 2 purposes:

  1. The user gets exactly what he wanted
  2. Notifies Search engines that your content has moved and it should now rank the new site instead of the Blogger one

In order to redirect posts from Blogger to WordPress, you need to do the following:

  1. Redirect users and search engines from Blogger to WordPress
  2. Redirect within WordPress to the correct post / page

First, within Blogger navigate to the Settings page and click on Template on the left panel. Within the template page, scroll down and click on Revert to classic Template.

Now you will see a textarea called  Edit Template HTML. Replace the entire code with the following:

<html>
<head>
<title><$BlogPageTitle$></title>
<script>
<MainOrArchivePage>
window.location.href="http://yoursiteaddress.com/"
</MainOrArchivePage>
<Blogger>
<ItemPage>
window.location.href="http://yoursiteaddress.com/?blogger=<$BlogItemPermalinkURL$>"
</ItemPage>
</Blogger>
</script>
<MainPage>
<link rel="canonical" href="http://yoursiteaddress.com/" />
</MainPage>
<Blogger>
<ItemPage>
<link rel="canonical" href="http://yoursiteaddress.com/?blogger=<$BlogItemPermalinkURL$>" />
</ItemPage>
</Blogger>
</head>
<body>
<MainOrArchivePage>
<h1><a href="http://yoursiteaddress.com/"><$BlogTitle$></a></h1>
</MainOrArchivePage>
<Blogger>
<ItemPage>
<h1><a href="http://yoursiteaddress.com/?blogger=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>
<$BlogItemBody$>
</ItemPage>
</Blogger>
</body>
</html>

Just make sure to replace http://yoursiteaddress.com/ with your own new domain address.

Now just save the template and we have finished the first part of redirecting Blogger to WordPress.

Now let’s set up the WordPress part. Go to your functions.php file in WordPress and paste the following code:

function blogger_query_vars_filter( $vars ) {
$vars[] = "blogger";
return $vars;
}
add_filter('query_vars', 'blogger_query_vars_filter');
function blogger_template_redirect() {
global $wp_query;
$blogger = $wp_query->query_vars['blogger'];
if ( isset ( $blogger ) ) {
wp_redirect( get_wordpress_url ( $blogger ) , 301 );
exit;
}
}
add_action( 'template_redirect', 'blogger_template_redirect' );
function get_wordpress_url($blogger) {
if ( preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts) ) {
$query = new WP_Query (
array ( "meta_key" => "blogger_permalink", "meta_value" => $url_parts[2] ) );
if ($query->have_posts()) {
$query->the_post();
$url = get_permalink();
}
wp_reset_postdata();
}
return $url ? $url : home_url();
}

This snippet deals with the WordPress part of the redirection.

Now if you try to go to any of your old URLs in Blogger, you should be redirected to the correct post on your new WordPress site.

Congratulations! You have successfully transferred your Blogger to WordPress.

Join Thousands of Others and Never Miss a Post


Save 4 Later
Email these links to yourself