How to Migrate Blogger Blog to Self Hosted WordPress

How to Migrate Blogger.com Blog to Self Hosted WordPress

Do you want to migrate your Blogger blog to Self Hosted WordPress but do not know how to do it? Keep reading this post. Most of the blogger start their journey from a free blogging platform like Bogger.com or WordPress.com. India’s most popular blogger Amit Agrawal and Harsh Agrawal started their journey from Blogger.com.

It is strongly recommended from my side that any blogger must start their journey from Free Blogging platform to learn basics of Blogging once you gain expertise in Blogging migrate your free blog to self-hosted WordPress to get full control over your blog and make money. 

Free blogging platform is the great tool to experiment with Blogging like know your writing skill, find out a most profitable niche which will work best with affiliate marketing, learn basics of SEO etc. once you reach an expert level and your blog content getting the traffic you may move to Self Hosted WordPress.

Before you have decided to move to Self Hosted WordPress you must have two things one is Domain Name and other is Web Hosting. you can buy Domain Name and Shared Hosting from Bluehost [Click here for latest Price]. I personally recommend Bluehost shared hosting plan. it is officially endorsed by WordPress community and host more than 2 million websites.

Why Migrate Blogger Blog to Self Hosted WordPress-:

How to Migrate Blogger Blog to Self Hosted WordPress

As I said Free Blogging Platform are an awesome tool to experiment with blogging without any investment. If anything is free then it must have some cons unlike WordPress.com and Blogger.com have, You will not have full control on your blog.

Limitation of Blogger.com Blog-: Google is one of the most innovative company. It has been seen that Google has killed is many products. Apart from other popular Google Product and services Google is less focusing of Blogger.com, I have not seen any major upgrade to blogger.com

there is rumour Google may kill blogger.com unlike Google did with Google Plus. It has been seen that Google has deleted many blogs without any notice just imagine your years of hard work vanish with a single violation of policy. It is good to start with blogger.com but never stay for a long time.

Essential Steps to Migrate Blogger Blog to Self Hosted WordPress-:

Once you have purchased Domain Name and Shared Hosting now it is time to start moving your Blogspot blog to self-hosted WordPress. Follow the following steps.

Step.1-: Install WordPress on your hosting. read my complete guide on Installing WordPress on Bluehost Hosting. if you have purchased some other hosting then the procedure will be the same.
Step.2-: Now log on yo your blogger.com account and export all your content. Go to >setting>other>backup content.
How to Migrate Blogger.com Blog to Self Hosted WordPress
Step.3-: Now go to your WordPress Dashboard and click on Import and give the path of your file save from Blogger Blog. It will take time depends upon your file size.
Step.4-: Once your all blog post imported, now it is time to set permalink structure go to setting> permalink. in order to keep things smoother, I recommend setting the permalink structure of your blog blogger permalink structure. Blogger.com follows Month/Post name permalink structure keeps the same.
How to Migrate Blogger.com Blog to Self Hosted WordPress
Step.5-: once you have imported all your blogger blog content to your New WordPress website now it is time to set up a redirect so that all your existing user get redirect to your new WordPress website. Go to Your Blogger blog. Theme> revert to a classic theme.
Blogger blog will warn you that you will lose all your changes to theme accept that warning because you have to add 301 redirect script to your blogger classic theme. click on edit theme HTML backup your code and delete all code and add following 301 redirect script.
How to Migrate Blogger Blog to Self Hosted WordPress
Add Following Code-:
<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>
<link rel="canonical" href="http://example.com/" />
</MainPage>


<Blogger>
<ItemPage>
<link rel="canonical" href="http://example.com/?blogger=<$BlogItemPermalinkURL$>"
/>
</ItemPage>
</Blogger>
</head>


<body>
<MainOrArchivePage>
<h1><a href="http://example.com/"><$BlogTitle$></a></h1>
</MainOrArchivePage>
<Blogger>
<ItemPage>
<h1><a
href="http://example.com/?blogger=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>
<$BlogItemBody$>
</ItemPage>
</Blogger>
</body>
</html>
Step.6-: WordPress function.php file is the heart of WordPress. all you have to do is set up a redirect on your Function.php file copy the following code place at bottom of your PHP file.
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();
}
Step.7-: once to setup redirect it is all done you have successfully migrated your Blogspot blog to WordPress. all you have to do is to install an essential plugin which is as follow.

If you like my work, Please Share on Social Media! You can Follow WP knol on FacebookTwitterPinterest and Quora for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.

About Amar Patel 263 Articles
Hi, I am Amar Patel from India. Founder, Author and Administrator of wpknol.com. I am a Simple Average Man who Loves life and Love living life.Professionally I am a Mechanical Engineer. Apart from my Job, I Love to write the things around WordPress WordPress CMS.