How to migrate from Blogger to WordPress without Losing Google Rankings

Do you wish to switch your blog from Blogger (example.blogspot.com) to WordPress (example.com) without losing Google rankings? As a newbie, you started your blogging career with Blogspot and after getting used to it, you wish to wish to move to a self-hosted WordPress blog without losing Google page ranking, feed subscribers, and comments.

how to migrate from blogger to wordpress

Important: When you decide to migrate from Blogger to WordPress, first thing you need to make sure that when someone comes to your old blogger blog through the search engine or referral links, your visitors should be redirected to your new WordPress blog. In this way, you don’t lose your Google Ranking.

In this tutorial, I will teach you how to migrate from blogger blog to WordPress without affecting Google rankings.

Import Content from Blogger to WordPress

Step #1: To get started with WordPress, you’ll first need to buy a domain name and a hosting service. I will advise you to sign up with HostGator as it is one of the most affordable hosting company out there. HostGator is one of the most popular web hosting company and it has already hosted more than 7 million websites.

Step #2: After setting up domain and hosting, you’ll need to install WordPress on your new domain. Now, move to Step 4 to move your content from Blogger to WordPress.

Step #3: Backup your old blogger blog before transferring to WordPress. To create a Blogger backup file, go to Blogger dashboard and navigate to Settings > Other. Click on “Backup up content” to save the Blogger content to your computer in .xml format. Now, let’s import it your WordPress blog/site.

backup-blogger-content-before-import

Step #4: Now, log into your WordPress admin area. Navigate to Tools > Import. Here, you’ll see the Blogger option. Click Install now. Click Run Importer to continue. Now, WordPress will ask you to upload the XML file.

import-blogger-blog

Click on Choose file to upload the .xml file that you downloaded in Step 3 and then click Upload and import.

WordPress will now import all your Blogger contents such as blog posts and comments to your WordPress site.

Now, you need to assign a user to the imported posts. You can either assign an existing user to the imported content or create a new user account.

This way, you have successfully imported your Blogger content to WordPress.

Setup Redirection Properly

Setting up Redirection is the most important step to switch from Blogger to WordPress so that visitors from Blogger are redirected to your WordPress website.

On your WordPress dashboard, go to Appearance > Editor and open functions.php file. Copy/paste the below snippet at the end of function.php file. And, then hit the save button.

functionblogger_query_vars_filter( $vars) {
  $vars[] = "blogger";
  return$vars;
}
 
add_filter('query_vars', 'blogger_query_vars_filter');
 
functionblogger_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');
 
functionget_wordpress_url($blogger) {
  if( preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts) ) {
    $query= newWP_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();
}

By pasting the above code to function.php file, it will create a blogger to WordPress 301 redirect.

Now, go to Blogger Dashboard, click on Theme/Template. Scroll down to the bottom of the page until you find Revert to classic themes. Click on this link.

Under Edit Theme HTML, delete everything inside it and paste the below code. Before saving, replace every occurrence of http://example.com with your domain name. For example, if your domain name is abc.com, replace example.com with abc.com. Don’t forget to save the changes.

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

That’s it. You have successfully redirected your visitors from your blogger post to its respective WordPress post.

Open any URL of your Blogger blog, you’ll find that it is redirecting to the corresponding WordPress page.

Switch RSS Feeds from Blogger to WordPress

After redirecting your old blogger page to corresponding WordPress page, your last step it to switch blogger’s RSS feed to WordPress feed.

Go to Blogger dashboard > Settings > Other. Under Site Feed, replace your blogger feed URL to WordPress feed URL. Usually, WordPress feed URL is http://example.com/feed/. Replace example.com with your domain.

That’s it. you have successfully switched from Blogger to WordPress without losing Google Ranking. This method redirects all your blog posts, pages, comments, subscribers to your WordPress site.

After migrating to WordPress, you should submit your URL and XML sitemap to Google Webmaster tools.

If you need any help regarding Blogger to WordPress migration, you can ask your questions in the comments below.

Summary
How to migrate from Blogger to WordPress without Losing Google Rankings
Article Name
How to migrate from Blogger to WordPress without Losing Google Rankings
Description
In this article, you'll learn how to migrate from Blogger to WordPress without losing your Google Ranking, Feed Subscribers, and your blog posts.
Author
Publisher Name
HowToArticle
Publisher Logo

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *