How to Migrate from BlogSpot to WordPress with 301 Redirection

When I started my Blogging career, I started with BlogSpot and it’s always a wise idea to start with 0 investment when you are complete newbie. After, getting used to basics of Blogging, my next destination was to migrate to WordPress and after migration, I thought of sharing this migrate from BlogSpot to WordPress guide.

BlogSpot to WordPress Migration

We have already covered following topics in the series migrating from BlogSpot to WordPress

Before you migrate from BlogSpot to wordpress , you need two things : Domain name and hosting.

I suggest dreamhost, and why dreamhost ? You can read about dreamhost hosting on my previous articles


Domain name

Domain name can be .com, .info, .org, .net but I will suggest go for .com or .org domain address. Do read

There are few things needed to be taken care of while moving from BlogSpot to wordpress

  1. Traffic : You don’t want to give lots of 404 error pages to your visitors.
  2. 301 perma redirection : The migration should be 301 perma redirection , else all your posts will be broken.
  3. Permalinks : BlogSpot permalink and WordPress permalinks are not the same and it’s important that you fix permalink importing everything to WordPress.

Some important things to keep in mind while migrating :

  • After migration, don’t delete your BlogSpot blog.
  • 301 permanent redirection means telling search engine that   has been moved to new place , and all your traffic will automatically redirected to new domain address.

Our goal for BlogSpot to WordPress migration :

  • Migrating visitors from blogspot to wordpress
  • Migrating blogspot posts to wordpress
  • Migrating BlogSpot Comments to WordPress
  • Redirecting users to the post, rather then just homepage of new domain
  • Migrate Feedburner feeds
  • Migrate Picasa hosted Images to WordPress

In this tutorial, I assume your new WordPress blog is located at the root of your host

Like rather then

Step by step process of migrating from Blogspot to WordPress

Step#1 Change your WordPress permalink to match blog spot permalink

On your WordPress dashboard settings> permalinks, change your permalinks to match with blogspot permalinks


Step#2 Importing posts

Importing your blogspot blog post to wordpress : This can be easily done by using import and export feature of wordpress and blogspot respectively.

Refer to my last post on How to import blogspot blog post to wordpress

Step #3 Setting up redirection

Login to your blogspot basboard > Template> Edit HTML

Revert to classic template

Add the following code after <Blogger> , replace Shoutmeloud with your domain name

    <script language=javascript><!“
    var blog_root=;

    <script language=javascript><!“
    var process_page=;
    var newpage=process_page;
    var oldlink=<$BlogItemPermalinkUrl$>;


Between and , add the following code, replace shoutmeloud with your domain name

http-equiv=refresh content=0;url= />


Create a text file and name it as bloggerposts.php

Add the following code in the file and upload the file to the root of your domain using any ftp program, replace Shoutmeloud with your domain name


$search_link = $_GET['p'];
$vars = explode('/', $search_link);
$num = count($vars) - 1;
$filename = $vars[$num];
$slug = str_replace(".html", "", $filename);

$SQL = "SELECT posts.* FROM $wpdb->posts AS posts WHERE posts.post_name = '$slug' LIMIT 1";
$posts = $wpdb->get_results("$SQL");

if ($posts) {
    foreach ($posts as $post) {
        $found_link = get_permalink($post->ID);
        $found_link = "";


<script language="javascript"><!--
document.location.href="php echo ($found_link); ?>";

<meta http-equiv="refresh" content="2;url=php echo ($found_link); ?>">


You can also proceed immediately to

"<?php echo ($found_link); ?>"><?php echo ($found_link); ?></a>.</p>
<p>The main blog URL is <a href=""></a>.</p>

If you have followed each steps carefully, you have successfully migrated from blogspot to wordpress with 301 permanent redirection.

If you have any problem migrating from BlogSpot to WP, or other  question feel free to ask questions. If you still feel uncomfortable to take care of all this thing, You can hire me for blogspot to wordpress service.

Subscribe on Youtube

Article By
Harsh Agrawal is a blog scientist and a passionate blogger. He is blogging since 2008 & writes about Blogging, SEO, Make money online & tech. His blog, ShoutMeLoud receives 1 million Pageviews/month and have over 700K subscribers.


COMMENTs ( 51 )

  1. says

    I have helped one of my friend’s blog from Blogger to WP about 2 years ago. At that I have googled about this and then did this. But it was really a tough task to be done because we wont want to loose any thing in terms of SEO. But here you have provided a complete information about it. Many of the doubts are cleared in comments & reply.

  2. Nikhil says

    I think there is a mistake in line

    Between and , add the following code, replace shoutmeloud with your domain name

    http-equiv=refresh content=0;url= />

    Please correct it.

  3. says

    Sir, i have one question in my mind if i transfer my blogger to WordPress so how much time it will take to get index with my new domain website.

  4. says

    Hello Harsh,

    I am not interested in redirecting entire blog to WordPress. What I am currently trying to achieve is redirect specific posts to blogger. What should I do for that?

    What I have done so far is:
    * Redirect using JavaScript
    * Add conical url link tag

    What else should I do?

  5. says

    This is what I need! It seems that blogspot has already given me full knowledge about blogging, now this will be the time to migrate it on wordpress platform. Thanks a lot for this guide, this is very helpful for me..

  6. says

    Hi Harsh

    I have a PR 7 very old blogspot blog . I have to migrate it to wordpress and i have successfully done this type of migration before.

    But for this blog I am very much concern about the “labels” most of them are high PR (PR 4 to PR6).
    I want the same category structure on wordpress blog as “”

    I don’t want redirect stuff..Can i do it through permalink ??
    Adding “%20” “space” is a hard task. Please clarify how to do.


  7. says

    Hi Harsh,

    Thankful to you for providing awesome content. These are very helpful to newbies like me I have a doubt regarding this article. My site is currently on blogger platform I want to migrate it to WordPress. If I migrated to WordPress, will it affect my blog traffic?

  8. Sangeeth says

    I have a blog in blogger without a domain name.I want to move my blog to wordpress without buying a domain.Should i buy the domain before moving from blogger?Is it neccessary to buy hosting on wordpress?

  9. Aamir says

    I have godaddy domain and using it on blogspot platform. Now I want to move domain from godaddy to bluehost or hostgator and want to use wodpress self hosting service. How can I do all this ?

  10. Tamanna says

    your information is spot on and is the best detailed tutorial for moving from blogger to WP.
    Awesome work!
    Just wondering, if i follow everything above, I will not lose google page rank, search engine spots from google right? And, will this import all images associated with each post? Sorry for lengthy questions.

    • says

      It’s an old tutorial, and it might not work perfectly with latest version of WordPress.
      A simple idea is to:

      1) Import BlogSpot blog to WordPress (Using above trick) … I’m assuming you already using custom domain feature.
      2) Search for blogger permalink fix plugin, and fix your Permalink.
      3) Keep using Custom domain feature in BlogSpot, as it will automatically do 301 redirection for you.

      If you need manual assistance, you can get in touch for a quote using our service page:

  11. says

    Everyone must agree that no CMS is as flexible as WordPress. Everything is handy. The ready made plugins and themes will make a blog look like pro blog without any coding knowledge.

  12. Ravi Kochhar says

    How to move a blogger blog hosted independently on custom domain. I believe to do this you need to add A-records through your DNS management option on the domain registrar. But the dilemma is that the domain registrar says to point your the name servers to their name servers in order to do this which I don’t want to do since my blog is hosted somewhere else.
    Can you guide me how to achieve this without the need to change my name servers.
    Any help would be much appreciated.

  13. Sahan says

    Hello Harsh, I am using a custom domain in my blogger blog. I want move my blogger blog to wordpress and want to use this same custom domain with WordPress. Following this tutorial, can I do this without loosing traffic and permalinks ? Please reply soon.

  14. Jason says


    I have followed all the methods above but there is no redirection till now.

    Just a simple question. Where I should upload the bloggerposts.php to?

    is it at directory tree:root/domain name?

    I am currently using dreamhost and custom domain from godaddy.

  15. PMN says


    I’m saving this post as a bookmark – will try to do this later (I’m just about to test wordpress, so I have it in a folder in my root for now). One question rise though; I have 3 different blogs on blogspot – is it possible to transfere them all into the same wordpress blog using the method you have described in your post?

  16. Yousuf Khan says

    All the posts are redirected to homepage, i am also using the correct permalinks, please help me Harsh!

  17. Daniel says

    Hi Harsh,
    Thanks for the great article. One question: In the code snippets I’m seeing in your post there are lots of little rectangular boxes in the code. e.g.

    In “meta http-equiv=refresh content” there is a rectangular box immediately before and after “refresh”

    I’m sure this is just a WP formatting thing but I’m wondering what these characters should be? I assume just to delete them completely?



    P.S. Is this method still current??

  18. guy says

    thanks for information – 1 question though: should bloggerposts.php be uploaded to the public_html directory or one level higher, at root?

    • says

      Guy it depends … Some host give a replica of files in root into public_html so you can upload it anywhere.. Either in the root or it may be www or public_html. Depending on the installation directory of wordpress.

  19. Sathish Kumar says

    Hi harsh. I did everything u have told. But still its redirecting to blog home page instead of the respective post. Could u plz help me to solve this problem.

  20. Chethan T says

    .-= Chethan T ´s last blog ..Airtel Special 5 Advertisement. Boat and A Little Girl. =-.

  21. kenwooi says

    Thank you for the explanation!

    I’ve googled up this query and found other guides too. It’s somewhat different when I compare all the guides.

    So which guide should I follow if I’m planning to migrate my Blogger blog to a self-hosted WordPress?

    Other guides didn’t mention a bloggerposts.php file to the root of the domain. So I’m not too sure.

    Please bear with me as I’m not good with such technical stuffs. Thanks! =)
    .-= kenwooi ´s last blog ..Malacca: The Historical State =-.

    • says

      i know there are several ways.. but this is the way I prefer because I used the same method to migrate my blogspot blog to self hosted wordpress blog. Infact For my clients I use the same method along with few extra milestone.
      This guide will help you completely, in case you are not familiar with the technical terms, You can always hire us for do the migration for you.


  22. Yogesh says

    Thanks for sharing step by step guide for migrating blog from blogspot to wordpress. Can you please tell me will it effect in Google PR and SERP.

  23. says

    I hope you have uploaded the bloggerpost file at the root level of your domain.
    This post is intended for blogs which are hosted at root level of your domain but not at the level.

    Please crosscheck that, because many user used the same process for migration and it worked for them
    If for some reason, you can’t figure it out, you are always welcome to hire us for professional services

  24. Devin says

    I’m trying to follow your directions to migrate my wife’s blogspot blog to a hosted wordpress blog. For some odd reason, the blogspot blog is not redirecting at all. I see the meta refresh tag in the source and it seems correct, but the page never actually refreshes. Any ideas?

  25. Zemalf says

    Unless I’m mistaken, there is error in the code to be added in the blogspot template. the comment inside the javascript is missing one “-“. There seems to be only ‘

  26. wongsk says

    If migrate to wordpress,does Google PR lost ? The feedburber feed need to create a new one ? caused my blog subscribers around 2K.

    Please advise.

    • says

      I notice you are using feed burner so you can easily migrate along with all your feed subscribers..
      Apart from that your PR will be lost for first few months but you will get it back with the next update..

      For hosting you can have a look at this post :
      and if you need professional service to migrate to wordpress, you can see my services and testimonial

      Do let me know if you have any more queries..

      • wongsk says

        Hi Harsh,

        Thanks for your prompt reply.
        Actually i have a custom domain name,thinking that using it point to but i have used blogspot more that one year,all will have to starting from zero again if i using new custom domain name.

        Is it ok for me to do that ?

        • says

          If you use custom domain to point to blogspot.. It will not make any difference..
          But if you planning to host it somewhere else..Like self hosted wordpress blog.. Then you might face little problem at the beginning and later on once Google crawler get used to your 301 perma redirection.. Every thing will be normal.

  27. chethan says

    Is it possible to migrate to If it is possible How can i upload a text file to new to the root directory. How do i upoad a text file to root in wordpress. You Mentioned about ftp what’s that?

  28. Simran says

    I followed your method and migrated my blog to wordpress. But now the problem is that all my posts are getting redirected to wordpress homepage instead of post. Reply ASAP

    • says

      How about the permalinks Simran? Have u taken care of it? If not ..all your post will be redirected to HP…
      You better catch me on Mail. Will take care of the issue. :)

  29. Mohit says

    Nice blog post.
    Actually I need to know that how can i transfer my blog to wordpress with the same custom domain. I’ve purchased from blogger/google apps and now I want to move the blog to wordpress with the same domain. The permalink structure you have shown above would be very helpful in this process. So Harsh, Is there any way to do so?

  30. Molly says

    I don’t have much traffic to my blog yet so deleting it won’t lose any ‘juice’. All I want is some of the posts there and I can copy and paste them as new blogs to the new WP one. Is this feasible or will search engines access the old pages anyway, even if I delete the blog?

    • says

      Molly if you simply copy paste the old post, that will be page duplication. In that way your new blog will be counted as spam blog.

      What you can here is

      Delete the blogspot posts which you don’t want to keep and remove them from search engine using Google webmaster URL remover tool.
      Now apply the 301 permaredirection method as mentioned above in the post.
      This way you can keep the post you want to and migrate them successfully to new wordpress blog, without hampering your traffic and link juice.
      If you have any doubt or questions feel free to ask.

  31. Chetan says

    The important thing here is that the 301 redirection will also take care of SEO that is Pagerank juice !
    Thanks for the nice and easy tuto … :)

    • says

      Chetan you are right, usually people just import posts from blogspot and that create exact replica of blogspot copy and thus duplication issue.
      Such blogs get penalize soon. This process need utter care to pass on the link juice and page rank to new domain.

  32. Molly says

    Hey! Been awhile. Always catch your blogs through my inbox, just haven’t had time to Twitter or visit long enough to comment until now.
    My question is about moving my blogspot blog to WP. I don’t really have any traffic as yet (was waiting for the move) so can I just move the posts I want to keep physically (copy and paste) to WP and then delete old blogspot blog? I have a domain and host now so can be more flexible than when we discussed the move before.