The problem listed above might appear magnificent, but we can minimize their effect by utilizing effective methods. We will simply redirect our OLD blog posts to NEW one so search engine bots don’t get confused in identifying whether we are on Blogger or WordPress.
In this tutorial, we will learn how to switch from Blogger to WordPress without losing your major SERP ranking. We will also discuss how to redirect our old feed to New WordPress Feed, so let’s get back to work.
Step by Step Guide
Before we get started, it will be splendid if you create a dummy blog for experiments. By doing this, you will not only eliminate mistakes and by chance if anything goes wrong you will have the certain satisfaction that you are not working on your main Blog. This will also minimize your errors in the main Blogger to WordPress transformation. Don’t forget to take a Backup of your Blogger Blog i.e. Posts Data as well as Template.
Step#1: If you don’t have a Hosting then what are doing here go ahead and get a
cheap domain, as well as
Hostgator hosting. We will recommend you to go with Hostgator because those guys are always ready to help.
Step#2: Now you have to import your entire Blogger Blog to WordPress
Go to WP-admin Panel >> Import >> Tools >> Blogger
Now give permission to WordPress to access your existing Blogger account by pressing the button which says “Authorize”.
After granting permission you able to see list of multiple blogs attached to your certain Blogger account, just import that blog which you want to migrate to WordPress by pressing “IMPORT” button. Now after the blog is completely imported give admin right.
Step#3: Now Copy the following PHP coding and save it into an empty notepad, renaming it to “Blogger.php”. After that you have to use CPanel or any other FTP software to upload it to Your WordPress Theme Directory. Keep in mind you have to Upload it in your Theme Directory i.e. WP-content/themes/your-theme where your-theme is representing your theme’s name.
<?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: After Uploading the PHP file to your WordPress directory
Go to WordPress Admin >> Add new Page.
In the title write blogger while keeping your post body empty (Don’t use capital “B” in blogger)
Now select “blogger” from the templates tool in the sidebar menu and then publish the page.
Make sure that your domain structure looks like this www.xyz.com/blogger.
Step#5: Now you have to redirect your current BlogSpot Blog to WordPress but if you don’t redirect the existing blog Search bot will mark you as spam because you are duplicating your content for the sake of traffic. Just Copy the following Chuck of code and
Go to Blogger >> Template >> Revert to Classis Template >>
Now you will be able to see a text box, just paste the Code there and save your template. Remember: Replace http://www.mybloggertricks.com/ with your domain name and don’t forget to align http:// as well as trailing slashes with your domain name.
<!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://mybloggertricks.com/'
</MainOrArchivePage>
<Blogger><ItemPage>
window.location.href='http://mybloggertricks.com/blogger/?q=<$BlogItemPermalinkURL$>'
</ItemPage></Blogger>
</script>
<MainPage><link rel="canonical" href="http://mybloggertricks.com/" /></MainPage>
<Blogger><ItemPage>
<link rel="canonical" href="http://mybloggertricks.com/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://mybloggertricks.com"><$BlogTitle$></a></MainOrArchivePage>
<Blogger><ItemPage>
<a href="http://mybloggertricks.com/blogger/?q=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a>
</ItemPage></Blogger>
</h1>
</div> </body></html>
<!-- replace mybloggertricks.com with your WordPress site URL --->
Congratulations! You are successfully migrated to WordPress without losing a single piece of Search engine rankings I guess that deserves Cheers!
Redirecting your old Feed URL to WordPress Feeds:
When you migrate from Blogger from WordPress, your Feed URL might change so to redirect your existing feeds to WordPress