• X

    How to Migrate from BlogSpot to WordPress with 301 Redirection

    By in WordPress

    Bluehost hosting

    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.

    We have already covered following topics in the series migrating from BlogSpot to WordPresswordpress logo thumb4 How to Migrate from BlogSpot to WordPress with 301 Redirection

    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

    Hosting

    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 www.shoutmeloud.com/ rather then www.shoutmeloud.com/blog

    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

    /%year%/%monthnum%/%postname%.html

    permalinks likeblogspot thumb How to Migrate from BlogSpot to WordPress with 301 Redirection

    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

    revert classic template thumb How to Migrate from BlogSpot to WordPress with 301 Redirection

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

        <MainOrArchivePage>
        <script language=javascript><!“
        var blog_root=http://www.shoutmeloud.com/;
        document.location.href=blog_root;
        //“></script>
        </MainOrArchivePage>
    
        <ItemPage>
        <script language=javascript><!“
        var process_page=http://www.shoutmeloud.com/bloggerposts.php;
        var newpage=process_page;
        var oldlink=<$BlogItemPermalinkUrl$>;
    
        newpage+=?p=+oldlink;
        newpage=newpage.toLowerCase();
        document.location.href=newpage;
        //“></script>
        </ItemPage>

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

    http-equiv=refresh content=0;url=http://www.shoutmeloud.com/ />

    Step#4

    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

    php
    
    require($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
    $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);
        }
    }
    else
    {
            $found_link = "http://www.shoutmeloud.com/";
    }
    
    ?>
    
    <html>
    <head>
    <title>Redirecting...</title>
    <script language="javascript"><!--
    document.location.href="php echo ($found_link); ?>";
    //--></script>
    
    <meta http-equiv="refresh" content="2;url=php echo ($found_link); ?>">

    Redirecting…

    You can also proceed immediately to

    "<?php echo ($found_link); ?>"><?php echo ($found_link); ?></a>.</p>
    <p>The main blog URL is <a href="http://www.shoutmeloud.com/">www.shoutmeloud.com/</a>.</p>
    </body>
    </html>

    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.

    Get Free Blogging updates in your Email

    Find more Topics based on Keywords

    Article by

    Harsh has written 1264 articles.

    If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

    { 40 comments… read them below or add one }

    Bariski

    Kewl, simple and clear :)

    Reply

    Harsh Agrawal

    Thanks Bariski
    I’m glad that you find it useful.

    Reply

    Molly

    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.
    Molly

    Reply

    Harsh Agrawal

    Molly you can import your blogspot blog to wordpress with 301 perma redirection, do remember you don’t have to delete your blogspot blog, else you will be penalize for Google if it’s not a 301 perma redirection. Let me know if you have more questions.

    Reply

    Molly

    Thanks! Exactly what I needed. Will take care of it asap.
    Molly

    Reply

    Harsh Agrawal

    Best of luck buddy :)

    Sham

    Very much a required post..Cos many are changing from Blogger to Wordpress now days i feel..

    Reply

    Chetan

    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 … :)

    Reply

    Harsh Agrawal

    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.

    Reply

    Molly

    Harsh,
    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?
    Molly

    Reply

    Harsh Agrawal

    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.
    Regards
    Harsh

    Reply

    Mohit

    @Harsh
    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 techeguide.com 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?

    Reply

    Simran

    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

    Reply

    Harsh Agrawal

    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. :)

    Reply

    chethan

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

    Reply

    wongsk

    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.

    Reply

    Harsh Agrawal

    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 :http://www.shoutmeloud.com/shoutmeloud-free-wp-webhosting-partners
    and if you need professional service to migrate to wordpress, you can see my services and testimonial http://www.shoutmeloud.com/services

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

    Reply

    wongsk

    Hi Harsh,

    Thanks for your prompt reply.
    Actually i have a custom domain name,thinking that using it point to blogspot.com 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 ?

    Reply

    Harsh Agrawal

    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.

    Zemalf

    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 ‘

    Reply

    Devin

    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?

    Reply

    Harsh Agrawal

    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 domain.com/blog 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
    http://www.shoutmeloud.com/services

    Reply

    Yogesh

    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.

    Reply

    kenwooi

    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 =-.

    Reply

    Harsh Agrawal

    Kenwooi
    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.
    http://www.shoutmeloud.com/services

    Regards
    Harsh

    Reply

    Chethan T

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

    Reply

    Sathish Kumar

    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.

    Reply

    guy

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

    Reply

    Harsh Agrawal

    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.

    Reply

    Daniel

    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?

    Thanks.

    Daniel.

    P.S. Is this method still current??

    Reply

    Yousuf Khan

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

    Reply

    PMN

    Hi,

    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?

    Reply

    Harsh Agrawal

    PMN you can describe all 3 blogspot blog into 1 WordPress but method would be lil complex and above said method will not work in that case…

    Reply

    Jason

    Hello,

    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.

    Reply

    Sahan

    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.

    Reply

    Harsh Agrawal

    Hey Sahan
    It’s an old post and many things has changed till then. You can take help of my BlogSpot to WordPress migration service: http://bloggertowpmigration.com/

    Reply

    Ravi Kochhar

    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.

    Reply

    Pavan Somu

    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.

    Reply

    Tamanna

    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.

    Reply

    Harsh Agrawal

    @Tamana
    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: http://www.shoutmeloud.com/services

    Reply

    Leave a Comment

    Previous post:

    Next post:

    `