The Best Tutorial On Migrating From Blogger To WordPress

migrating from blogger to wordpress


“Migrating from blogger to wordpress” for a blogger who has started his career with blogger and made his brand name the above is a beautiful as well as a horrifying dream at the same time, isn’t it?

If you have been following Inside Tech Tricks since the beginning you might be knowing that this blog was earlier hosted on Google’s blogger platform and on 26 April 2013 it was shifted to wordpress.

Like every other blogger who started with blogspot and later thought of migrating to wordpress I was also scared till death because I have heard it from the professionals, if anything went wrong you will lose all your hard work in a single shot

But, I took the risk not just because I wanted to prove them wrong but I wanted to actually move to wordpress to have a more flexible platform and blogger was not meeting my SEO needs.

So first of all let us go through some reasons why anyone would think of migrating from blogger to wordpress,

Primary reason is the flexibility, I was on blogger for a year and I knew how to get the most of that platform but whatever you say wordpress is more flexible.

It is not like, things you can do on wordpress are impossible to do on blogger, you can actually do that but for that you need to be really good at coding, by good I mean really good

Here are some more points in which wordpress beats blogger

  1. Better Design Options
  2. Better SEO
  3. Plugins for anything
  4. Full Control Over your blog

Amit Agarwal, Harsh Agarwal and many others who started off with blogger later migrated to wordpress because blogger was not meeting their needs

Before migrating I also want you to know that if at the moment your needs are not much, I mean you can’t get time for maintaining a wordpress blog then here are few ways in which blogger is better than wordpress

7 Reasons why should not migrate to wordpress (By MyBloggerTricks)

First I recommend that you read the linked article as it will finally help you decide that you actually want to migrate to wordpress or not, and remember it is not like once you have migrated to wordpress you cannot move back to blogger, If you didn’t like wordpress or if you find it complicated then you can move back to blogger at any time

If you have decided to stick to blogger then I recommend please bookmark this article because if you make up your mind to migrate to wordpress in future then this post will help you out in the process.

Preparing for the migration, Let’s get started

If you have decided to migrate to wordpress then the first things you need to do is get hosting and register a domain name

For Hosting I recommend to go for Hostgator as they are in the business since 2002 and host more than a million small and big websites and blogs

As I have nice terms with the company, I asked them if they could give some discounts for the readers of Inside Tech Tricks and they agreed

You can use the coupon code INSIDETECHTRICKS25 to get 25% off your entire order or you can use the coupon INSIDETECHTRICKS10 to get $9.94 off

Click here to buy webhosting from hostgator

I also recommend using godaddy for registering your domain name as the company hosts more than 13 million domains and users who don’t have a patpal account can now pay via netbanking, check or other traditional ways

Click here to check out domains at godaddy

On Blogger, there are two scenarios

Those who use the blogger subdomain ( and those who already have a custom domain associated with their blogger account (

For blogger who are on a subdomain they don’t have to do anything for the domain now but those who have a custom domain with their blogger account you need to follow the following steps to move back to a subdomain

Login to your blogger account –> Settings –> Basic

In the basic setting where you see your domain there you will notice a cross button after your custom domain

Click on that cross to remove the custom domain from your blogger blog

Now, you need to associate that domain with your hosting account

Login to your domain registrar’s website

Select your domain and then go to the DNS manager (where you added the CNAME and other records when you configured it for your blogger account)

In your domain’s DNS manager, first thing to do is clear out the CNAMES and other records which google asked you to enter when you were setting up custom domain for your blogger blog

Better, clear out every other CNAME or A record or other things even the Nameservers as we will have to add different name servers which your web hosting provider must have given you

You will be given the nameserver URL and IP address by your hosting provider, add them

If you didn’t receive any such email regarding nameservers then you can browse through the knowledgebase of the web host for related tutorials

When you have changed your nameservers you need to add the domain to your hosting account

In his case there are two scenarios

If you have bought a single site pack from the web host they might have already asked you for a domain to setup your cpanel account in that case you don’t need to do anything else with the domain, just changing the namerserver would be enough as the company has already added that domain with your account

If you have a multiple website hosting account and your primary domain is some other domain then you need to add an add-on domain after changing the nameservers

Primary domain is the domain which the webhost used to create your cpanel account

You might also ask your web hosting provider to setup that domain for you (they will do it for FREE)

Next Step is installing wordpress on that hosting,

Gone are the days when we used to install wordpress using FTP applications and only a geek can do it, your hosting provider would be having softaculous or any other script installer which you can use to install wordpress on that server.

Again you might ask your web hosting provider to also install wordpress for your account, they will do it and email you the login details of your wordpress dashboard, later you may change the password

After installing wordpress and setting up everything else, now starts our real job

Keeping the permalinks same

Blogger has a predefined format for permalinks (slugs in terms of wordpress) and wordpress is flexible you can have any type of permalink structure for your URLs

We will add a 301 redirect to our blogger blog so that all our Google juice passes on to the wordpress blog with time, for adding the 301 redirect it is necessary to have same permalinks in wordpress as they were on blogger

For making the permalinks same, head to your wordpress dashboard

Click on settings –> permalinks

In the permalinks setting you will see an option called custom structure, there add the following line


Save your settings permalinks

Importing the posts from blogger

Now we are all set to import our posts from our blogger blog In your wordpress dashboard click on tools –> Import import In the import page click on blogger and on the popup click on Install now intall importer The importer plugin will be installed, click on “Activate plugin & run importer” You will be redirected to your Google account and Google will ask you to authorize wordpress to import your posts Click on grant access Now you will be again taken to your wordpress dashboard and you will now have to select the blog from which you want to import the posts nablog Select the blog and then click on import WordPress will start importing your posts and comments now, when every post and published comment will be moved to wordpress the text on the import button will change to continue Click on continue Now you will be asked to select your wordpress user with whom you want your imported posts to be associated with and then click on save changes Now all your posts are moved to blogger After importing the posts you have to now install your wordpress theme and set it up totally running

Redirecting the old blog to the new one: the 301 redirect

Now we need to solve one more problem There are two posts; one with your blogspot blog and one with your wordpress blog and this is a problem as Google will penalize the blog having two indexed URLs for the same post So we have to add the redirection Copy the below code in notepad and save this file with the name “blogger.php” (without quotes)

 Template Name: blogger
 global $wpdb;
 $old_url = $_GET['q'];
 if ($old_url != "") {
 $permalink = explode("", $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 ".
 $new_url = $wpdb->get_var($q)? $wpdb->get_var($q) : "/";
 header ("HTTP/1.1 301 Moved Permanently");
 header("Location: $new_url");

Now, Go to your cpanel account –> the directory where you have installed wordpress –>wp-content –> themes –> your theme name

Upload blogger.php in this folder

Now go to your wordpress dashboard and click on pages –> add new

Name the page as “blogger” (without quotes) and on your right side in the template dropdown select “blogger” and publish the page

Now open your Blogger dashboard –> Templates

Scroll down and click on revert to classic templates

Now in the same window you will be shown the HTML editor of the classic template

Replace the whole code in the HTML editor with the following code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en"
<script type="text/javascript">
 &lt;MainOrArchivePage&gt;window.location.href='http://<span style="text-decoration: underline;"></span>/'&lt;/MainOrArchivePage&gt;
 window.location.href='http://<span style="text-decoration: underline;"></span>/blogger/?q=&lt;$BlogItemPermalinkURL$&gt;'
&lt;MainPage&gt;&lt;link rel="canonical" href="http://<span style="text-decoration: underline;"></span>/" /&gt;&lt;/MainPage&gt;
 &lt;link rel="canonical" href="http://<span style="text-decoration: underline;"></span>/blogger/?q=&lt;$BlogItemPermalinkURL$&gt;" /&gt;
&lt;div style="border:#ccc 1px solid; background:#eee; padding:20px; margin:80px;"&gt;
&lt;p&gt;This page has moved to a new address.&lt;/p&gt;
 &lt;a href="http://<span style="text-decoration: underline;"></span>"&gt;&lt;$BlogTitle$&gt;&lt;/a&gt;
 &lt;a href="http://<span style="text-decoration: underline;"></span>/blogger/?q=&lt;$BlogItemPermalinkURL$&gt;"&gt;&lt;$BlogItemTitle$&gt;&lt;/a&gt;

Replace with your blog’s url

And then click on save changes,

You are done, now your old blogger blog will now redirect to your wordpress blog

The Permalinks Problem

When I was on blogger, sometimes I didn’t get time to write new posts so I changed the date of previously published posts to bring them on the top and make my readers read the old post which they might have missed previously

If you have also done the same then you might face a problem which I did

Suppose your old URL was

and you have published this post in the month of march, in blogger the URL will remain the same but when you migrate to wordpress the URL will change to date when you republished it

like if the post with the above url was again published in march, then in wordpress the url would become

this will create SEO problems for your blog

the only way to solve this problem is to match your wordpress permalinks with your blogger permalinks manually and if any post does not match the year and month part then revert that post to draft because you cannot change the month in the permalink

wait for some time, when google un-indexes those posts you may publish them again, I did the same

Now we need to solve One more Problem,

If your blogger post URL was something like

and your wordpress blog url for the same post is now

did you see the difference in these URLs, that is because blogger automatically decides your permalink on the basis of your title, you can solve this problem by copying the below code in notepad

$res = $wpdb-&gt;get_results("SELECT post_id, meta_value FROM $wpdb-&gt;postmeta WHERE meta_key = 'blogger_permalink'");
foreach ($res as $row){
$slug = explode("/",$row-&gt;meta_value);
$slug = explode(".",$slug[3]);
$wpdb-&gt;query("UPDATE $wpdb-&gt;posts SET post_name ='" . $slug[0] . "' WHERE ID = $row-&gt;post_id");
echo "DONE";

and now save this file as “fix.php” (without quotes)

Now go to your cpanel and upload this file (fix.php) in the home directory where you installed wordpress (i.e. public_html directory)

After uploading, if your blog’s url is then visit from your browser and the only output you will see on your screen will be DONE

finally we have fixed all of the major problems

Importing Feedburner Subscribers

If you were using email marketing software like aweber then you are already playing good but if you are also using the old school method, Feedburner to power your email feeds then after migration you might lose all your old subscribers

For getting all your subscribers back, first you need to paste the following code in your “.htaccess” file you can get it by going to the directory where you installed wordpress
In that home directory there will be a file named “.htaccess” paste the following code in that file and save it

#ATOM Feeds
RewriteRule atom.xml feed/atom/ [L,R=301]
RewriteRule feeds/posts/default feed/atom/ [L,R=301]
RewriteRule feeds/posts/default?alt=rss feed/ [L,R=301]
RewriteRule rss.xml feed/ [L,R=301]
#Comments Feed
RewriteRule /feeds/comments/default comments/feed/ [L,R=301]
RewriteRule /feeds/comments/default?alt=rss comments/feed/ [L,R=301]

This code changes your default wordpress feed url to the one which you used to have when you were using blogger

Now if you were using the blogger subdomain then you just need to login to your feedburner account, click on the blog’s feed name –>click on edit feed details –> replace your old blogger domain with your new domain.

If you were already using a custom domain then you don’t need to do anything else further after adding the code in .htaccess file

And remember don’t ever delete your blogger blog in future as all your images and media is hosted on blogger and if you delete the blogger blog the images from your migrated posts will also be removed

Congrats! You have just successfully migrated your blog to wordpress

NOTE from my experience: When you migrate to wordpress your blog will see a drop in traffic in the starting but soon it will start getting more visitors than it used to get when you were using blogger

If you are facing any kind of problem in this process or it id difficult for you to understand some points, just leave a comment on this post or even  better shoot me an email and I will clear your confusions

If you really found this post useful, then also leave a comment with your feedback


  1. Heather says

    Thank you so much for this detailed post!
    You helped me greatly with the redirection matters.
    And btw I have moved my blog with cms2cms online converter, that moves content automatedly without scripts, codes. It took me 16 minutes to migrate my blog completely. I thought it will be useful for you because this tool is developed for web experts and for beginners as well. You may check how it works watching this video

    Happy Blogging!

Leave an awesome and valuable reply