Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Switch from Blogger to WordPress without Losing Google Rankings

Last updated on by
Follow WPBeginner on YouTube
How to Switch from Blogger to WordPress without Losing Google Rankings

Blogger is an awesome free tool to quickly start blogging. However, many Blogger users quickly realize that if they need full control of their blog, they would be better off with their own self hosted WordPress.org blog (What’s the difference between self-hosted WordPress.org vs WordPress.com blogs). In this step by step tutorial we will help you switch from Blogger to WordPress without losing Google rankings.

To get started with WordPress, the first thing you would need is a WordPress hosting service provider and your own domain name. We have hand-picked a list of WordPress hosting providers that we have used for our own projects. These web hosts offer special deals and discounts to WPBeginner readers and most of them offer a free domain name upon signup.

Once you have signed up for WordPress hosting and set up your domain name. The next step is to install WordPress on your new website. We have a step by step tutorial on how to install WordPress. Once you have installed WordPress, it is time to import your content from Blogger to WordPress.

Step 1. Import Your Blogger Blog into WordPress

To import your Blogger blog into WordPress, you need to go to Tools » Import and click on Blogger.

Installing Blogger Importer plugin in WordPress

This will bring up a popup, asking you to install blogger importer. Click on the Insall button and WordPress will now download and install Blogger Importer plugin for you. Once it is finished installing the plugin you need to click on Activate Plugin and Run Impoter link to continue.

Activate and run Blogger importer

On the next screen, you will be asked to authorize WordPress to import your Blogger blog. You need to click on the Authorize button on this page, which will take you to your Google Accounts page. On your Google Accounts page, you will be notified that the application WordPress is requesting permission to manage your Blogger account. You need to click on the Allow Access button to continue.

Allow WordPress access to your Blogger account

You will be now redirected back to WordPress where you will see the list of your Blogger blogs. All you need to do is click on the import button next to the blog you want to import.

Import your blogger blog into WordPress

WordPress will now import your blogger posts from blogger, once it is finished you will be asked to assign an author to the imported posts. You can assign your blogger posts to an existing author.

Congratulations! you have successfully imported your Blogger blog into WordPress. However, you still need to make sure that you don’t loose any search rankings and that visitors to your old blog easily land to the same content on your new WordPress powered website.

Step 2. Setting up Permalinks

Permalinks is the term used for URL structure of permanent links for individual entries in blogs. WordPress comes with a feature that allows you to set up SEO friendly URL structure. However, since you are importing content from Blogger you would want your URL structure to be as close to your Blogger URL structure as possible. To set permalinks you need to go to Settings » Permalinks screen and choose Month and Name as your permalink structure.

Choosing a permalink structure for your WordPress site

Step 3. Setting up Redirection

The most important step in moving any website is to set up redirection so that users are redirected to your new website. The crucial part of redirection is that you would want users to land on exactly the same page on the new site which they were accessing on the old site. Secondly, you would also want search engines to notice that your old site is moved to this new location.

To do this you need to set up redirection on two levels. First you will redirect Blogger visitors to your new WordPress blog. Secondly, once users reach your WordPress site you will redirect them to exact post they were accessing on your Blogger blog.

Let’s first set up redirection on the blogger blog. To do that you need to log on to your Blogger account and go to your Blog’s settings and click on Template.

Blogger Template

On the template page, you need to scroll down to the bottom of the page and click on Revert to Classic Template link.

Revert to classic template for your Blogger blog

After switching to classic template, you will see ‘Edit Template HTML’ text area. You need to replace every thing in this text area with the following code. Make sure that you replace http://www.example.com with your own 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://www.example.com/'
</MainOrArchivePage>
 <Blogger><ItemPage>
   window.location.href='http://www.example.com/blogger/?q=<$BlogItemPermalinkURL$>'
 </ItemPage></Blogger>
</script>
<MainPage><link rel="canonical" href="http://www.example.com/" /></MainPage>
<Blogger><ItemPage>
 <link rel="canonical" href="http://www.example.com/<$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://www.example.com"><$BlogTitle$></a></MainOrArchivePage>
<Blogger><ItemPage>
 <a href="http://www.example.com/<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a>
</ItemPage></Blogger>
</h1>
</div> </body></html>
<!-- replace example.com with your WordPress site URL --->

Save your template, and you have successfully implemented redirection on your Blogger blog. However, you still need to setup your redirection on your WordPress site so that users are redirected to the proper posts. To do that, you need to create a new file using a plain text editor like Notepad. Give this file a name like wpb-blogger.php and paste this code inside it.

<?php
 /*
  Template Name: WPBeginner Blogger
 */
 global $wpdb;
 $old_url = $_GET['q'];
 if ($old_url != "") {

// Fix for blogger blogs with .de and other tlds in their URLs
$tld_fix = preg_replace("/blogspot.[a-zA-Z0-9]+/", "blogspot.com", $old_url);
$permalink = explode("blogspot.com", $tld_fix);
   $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");
 }
?>

Save your changes and upload this file to your WordPress theme directory using an FTP client. Once you have uploaded the file to your theme directory go to your WordPress admin area and create a new page in WordPress. In the title field for this page enter blogger. Under the Page Attributes section choose WPBeginner Blogger as template and click on the Publish button.

Choosing the page template with redirection code

That’s all you needed to do. Now anyone visiting a post on your old Blogger blog will be redirected to the same post on your new WordPress site.

Step 4. Redirect Feeds

On your old blogger site, your feed subscribers will not be able to notice the switch. So it would be best to redirect your blogger feed to your new WordPress site’s feed as well. To do that, you need to go to your Blogger account. Go to the Settings &raquo Other and under the Site Feed section click on Add link next to Post Feed Redirect URL. Here you can enter your new WordPress site’s feed address.

Redirect blogger feed readers to your WordPress feed

Step 5. Import Images From Blogger to WordPress Media Library

During the import, your Blogger posts may still have images embedded which are still hosted on the blogger platform. You can import these images into your WordPress site. Follow the instructions in our how to import external images in WordPress tutorial, this will import all images from your blogger blog into your WordPress Media Library. Once the images are in your WordPress media library you can create image galleries and use other WordPress image related plugins with your imported images.

We hope this tutorial helped you switch from Blogger to WordPress without losing Google rankings. We would like to welcome you to the WordPress community. To get started with WordPress, please take a look at our beginner’s guide section for more WordPress tutorials. For questions and feedback, please leave a comment below.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • http://www.wpbeginner.com/ WPBeginner Staff

    You can re-run the importer again. It is smart enough not to import posts previously imported successfully.

  • http://missyartblog.wordpress.com/ mariya

    i don’t understand I am stuck at the step where i change my blogger template to classic and go into the edit html…i cannot find http://www.example.com in my web address…what am I doing wrong ?? please help ! note i don’t have my own domain name its like
    ” xyz.blogspot.com”
    please help !

  • Tiffany Burton

    Thank you for a wonderful tutorial. After reading many of the comments and double checking things I still have a question. The redirect links on my blogger site are working great. All my posts have a link now that takes them to my new wordpress site. The problem is when I get there instead of taking me to the matching post my wordpress site says:
    “Well this is somewhat embarrassing, isn’t it? It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.”
    Everything imported correctly and the posts are there. What part did I do wrong? I have the blogger page made and uploaded my php file via filezilla without a problem. I even found a plugin to let me exclude pages from my sites navigation bar. This is my first time ever typing code of any kind could that be the problem? I am just wondering what I need to do from here.

  • http://www.wpbeginner.com/ WPBeginner Staff

    Please make sure that you have modified the blogger template correctly and that it is redirecting users to the blogger page on your WordPress site.

    Also make sure that the blogger page is using the wpb-blogger.php file as its template.

    If all of this seems right, then check the URL you are directed to and compare it with the post’s URL on your WordPress site. Report back with more information and we will try to figure this out.

  • Diana

    Thanks for these instructions, I have to admit i have four this a HUGE learning curve. Ive followed all of your steps to the letter, but now am at the end of Step 3. I have created a new page, but don’t get the WP Beginner Blogger option on drop down. Did I miss a step somewhere. any help would be much appreciated.

  • http://www.wpbeginner.com/ WPBeginner Staff

    We will look into it and update the article.

  • http://www.wpbeginner.com/ WPBeginner Staff

    Adrain you should remove it from your site’s navigation menus or sidebars. The purpose of this page is to redirect users coming from blogger to correct posts in WordPress.

    Making a page private will make it inaccessible. This means users coming from blogger will not be redirected.

  • Adriane

    After creating the page labeled “Blogger” and using the WP Beginner theme, what is the purpose of the page and should it be displaying anything? When I click on it I just see a white screen.

    • http://www.wpbeginner.com/ WPBeginner Staff

      The purpose of this template is to redirect users coming from blogger to correct posts on your WordPress site.

  • http://www.wpbeginner.com/ WPBeginner Staff

    Seems like redirection is not working, please make sure that you haven’t missed anything.

    • Cathy

      I’m having the same issue, although I’m getting a 403 error. When I test a link from the old blogger site, the address in the bar changes to something like http://www.newblog.com/blogger/?q=http://www.oldblog.blogspot.com/2014/04/old-blog-post-title.html which results in the 403. I’m pretty sure I’ve followed all the steps noted, can you advise? Thanks!

    • Cathy

      I wanted to reply to my earlier post, because I found out what the issue was. The new WordPress blog is hosted on Hostgator, and that particular host has some changes that need to be made in order for this Blogger–>Wordpress technique to function correctly. If you contact tech support there, they can assist with it.

  • Helen

    Sorry – I’ve fixed it. The main issue for other users is finding the right folder to put the php folder in. Not easy and you may have to contact your host support as I did.

  • anu

    I do have another question as well…do you know how I can move my blog followers to wordpress site? is there a plugin?

  • anu

    This is a very helpful post…thank much for sharing…I have a question here,….this will move only the post, comments and the media right? but it does not do anything to move the blog pages to the wordpress….is there a way to move the pages and it’s contents as well?

    I still didn’t do the redirection …as I was not sure if I need to do more changes with respect to the pages in wordpress.

    Please help.

  • Mahesh Waghmare

    Nice article, Thanks.

  • Sharron Goodyear

    I have followed your instructions up to the point before saving the php file. I went into Edit HTML and deleted the code that was there and replaced it with what you have listed above. I then saved the template.

    However now when I try and access the ‘Edit HTML’ I get the following error message:

    We’re sorry, but we were unable to complete your request.
    When reporting this error to Blogger Support or on the Blogger Help Group, please:
    Describe what you were doing when you got this error.
    Provide the following error code.
    bX-4b250i
    This information will help us to track down your specific problem and fix it! We apologise for the inconvenience.
    Close

    Please could you tell me why this might be as this is causing a major issue for me!!

    Many thanks

    Sharron

    • http://www.wpbeginner.com/ WPBeginner Support

      Wait for a while and then try again. Remember that your posts on your blogger site are perfectly safe and you can always go back to Templates and restore your blogger blog.

  • marielle altenor

    I’m in the process of moving my blogger site to wordpress.org. My question has to do with Google Analytic. Do you have a post that talks about how to go about it? Would I be using the same profile for my new wordpress.org blog or create a new one and start the page view and such from the start?

    • http://www.wpbeginner.com/ WPBeginner Support

      Marielle, yes we do have a Google Analytics setup guide. You can use the same Google account. However, since this will be a different domain name, you will have to create a new site profile for it.

      • Avadhesh

        What if i also want to move the domain too.

  • Tanja Jensen

    Hi there!
    After I imported my blog, all my images are looking bad :( The quality is not good…. But all the images did import into my media library.
    Can I do something that will update all the images in my posts or do I really have to go through every single post manually?
    – Tanja

    • http://www.wpbeginner.com/ WPBeginner Support

      Tanja if you have successfully imported images to your media library, then you probably need to regenerate images.

      • Tanja Jensen

        Hello again! Well, it did help me with my thumbnails, but my pictures in my posts still look grumsy. I have tried to upload the same picture again directly from the media library, but I really do not want to go through all my 300 posts if I can help it! See example here: Can you see my problem?

        • Tanja Jensen

          Oh…. I can see that the URL of the image is the old IP address from WordPress – I guess it should be custom domain? Can I change that in a quick way?

        • http://www.wpbeginner.com/ WPBeginner Support

          You can try importing the external images. After that you need to run the regenerate thumbnails script once again.

  • Tanja Jensen

    Hi there
    I have a problem with Step 3. I cannot see my .php file unde ‘Template’ when creating the new page titled ‘blogger’. What may I have done wrong?
    – Tanja

    • Tanja Jensen

      Uh, I think I fixed it. Just had the place the file in some sub directories = the right place :-) Although a bit hard to figure out since there are many main and sub folders in my FTP client! Hard for a beginner to figure out… – Tanja

  • TIffany Ima

    This is a great tutorial, except it doesn’t explain how to add the file to the theme directory, and I am completely lost. I cannot get my post to redirect appropriately.

    • http://www.wpbeginner.com/ WPBeginner Support

      Tiffany, you need to use an FTP client to upload the file to your theme directory.

  • Tanja Jensen

    HI there! I am about to move my blogspot blog to WordPress – YAY! But before I do that, I want to make sure about one thing: when I import my blog from blogspot to WordPress, will I then delete it on blogspot or just copy it? I mean, if something goes wrong, I want to be able to go back to my blogspot to continue making posts until I get the WordPress to work.
    Another question – when I import my blog, where will WordPress import my blog posts – to a particular page or to specific WordPress posts? And what about my tags/labels or what you call it here… I depend a lot on my division on tags :) I haven’t seen the ‘inside’ of the WordPress admin panels, so I don’t know how it all looks. I mean, do I have a special section called ‘posts’, where I write post, edit my old ones etc?
    Thanks for the help! – Tanja

    • http://www.wpbeginner.com/ WPBeginner Support

      Tanja, this guide does not ask you to delete any posts from your Blogspot site. This method only redirects users coming to your blogger site to your WordPress site. Your blogger posts should remain as they are and if you wish you can always switch back your blogspot template and your blogger site will be live and accessible again.

      • Tanja Jensen

        Good to know, I was just worried about what was meant by the word ‘import’ – delete or copy :) I am a beginner (as most others looking at this site), so I just wanted to make sure – that I could still run my blog while I was setting up the WordPress version of it. Thanks for the help! :)

  • Bob Jones

    I have the same problem that Rachelle, above, has. When I then go to create a page in WordPress, WPBeginner Blogger does not come up as an option in the templates. My only options are “Default Template,” “Contributor Page,” and “Full Width Page.”

    Any post I view on Blogger now shows the text of this page, concatenated in a continuous line of text.

    Help!

    Bob Jones
    Salem, Oregon

    • http://www.wpbeginner.com/ WPBeginner Support

      Bob, it seems like the template file is missing theme, which is causing WordPress not to recognize the template file. Please copy pase the code again.

      • Bob Jones

        Thank you for your reply to my question. I copied the code in the first block under step 3 into my blogger template. I then copied the code in the second block of step 3 into a wpb-blogger.php file and uploaded that file to the server directory containing the WordPress files. I see that WPBeginner Blogger is the name of that template.

        What happens now when I click on a post in a Google search results page listing is that I get sent to the blogger page I created in step 3. I do not get sent to the post that was shown on the results page.

        Also, I still do not have WPBeginner Blogger as a choice in the Page Attributes / Template drop-down box.

        Getting closer, but still not there.

        Bob Jones
        Salem, Oregon

  • David Reber

    Did something change in the newer versions of WordPress. I needed to add the Page Theme plugin to allow for a different theme to be used on different pages.

  • Farhan

    Thanks for the great article, I want to move my blogger site to wordpress but want a new perma link structure.

    So instead of a date based system i.e. year/month/blog title like 2014/03/tutorialA.html I want to change it to /tutorials/3Dsoftware1/tutorial1.html

    Is there a code solution that I can implement in the head of the blogger file or in each post’s html version to target my old blogger posts to my new wp site? Each post will now be listed by its categoryName/post_title.

    Perhaps I should create two posts i.e. do the straight forward conversion then apply category based URI with a 301 redirect? I imagine not as there will be an extra duplicate post.

    Thanks so much

  • Asdrubal Romero

    I have done all up to the point of setting redirection at wordpress. You say that i have to upload a file but i do not even know how i do that. What is the ftp direction of wordpress and do they have a reserved space for each user?

    • http://www.wpbeginner.com/ WPBeginner Support

      First make sure that you are on a self hosted WordPress.org site and not WordPress.com blog (see the difference). After that you need to contact your web host to find out your FTP account user name and password. In case you don’t want to use FTP, some web hosts also offer a file manager available on your cPanel dashboard.

  • nil

    Hey,

    I would only like to change the rel=canonical URL from my old blogger blog to my new blog, not redirect everything. Do you know how? That would be great!

    Just tried few manuals from the net, nothing works anymore.

    Thanks
    nil

  • Rachelle

    Hello,

    I’ve been able to import my blogger posts (except the very first post, which I still cannot figure out why it didn’t import) to my hosted WordPress account. I was able to get everything to work–including the Blogger redirect–until I reached the step where you have to setup the redirect for WordPress itself so that each individual post on Blogger is redirected to the new location on WordPress. I created the PHP file and pasted in the code exactly as was posted above. I then uploaded the file to the theme folder where the WordPress files are on my account. However, when I then go to create a page in WordPress, WPBeginner Blogger does not come up as an option in the templates. My only options are “Default Template,” “Contributor Page,” and “Full Width Page.”

    I’m at a total loss as to where I went wrong. Any ideas on how to correct this issue? I don’t want people clicking on a direct link to one of my Blogger articles to see a “Page Not Found” error.

    Thanks!

    • Glenn

      I have the same problem: I uploaded the file and the WP Beginner template does not show as an option. Can someone share a solution?

    • http://www.wpbeginner.com/ WPBeginner Support

      Please make sure that you have created the template file in /wp-content/themes/your-theme-directory/

      • Glenn

        I *think* we’re getting close, but it’s still not working. Hmm, do I need to do anything differently if my wp blog has a different title than my blogger blog:

        blogger name: autismplusmath.blogspot.com

        wp name: autismpluslande.com

        THANK YOU for your continued help with this: appreciate the quick reply to my last query!

  • Emma

    I have tried everything on redirect from blogger and I get this error:

    Error parsing XML, line 2, column 73: The value of attribute “dir” associated with an element type “html” must not contain the ‘<' character.

    can you help please?

    • http://www.wpbeginner.com/ WPBeginner Support

      Emma, it seems like you are pasting the blogger template code in the wrong location.

  • Dino

    Hi,
    I have a self hosted blog WordPress on Bluehost and I’m trying to migrate contents from my old Blogger blog.
    I did the export step from Blogger, but when I’m on my wordpress dashboard, I do tools>import, then a completely white page appears.

    What can I do?

    Thanks.

  • Marco Dickert

    Hi there,

    I just tried to migrate my blogger-blog to my self-hosted wordpress. Almost all things work as expected, but not the redirection from blogger. I inserted a logging function in the template code for the wordpress-sided interface and recognized that this page does not get any parameters from the blogger redirection. That means I simply get redirected to my home page.

    Is it possible that blogger changed variable names or something? Does anyone has an idea how I could fix that problem?

    Cheers, Marco

    • http://www.wpbeginner.com/ WPBeginner Support

      Marco, we have just updated the post with a completely new re-written version. Please follow it now, hopefully it will resolve your issue.

      • Marco Dickert

        @WPBEGINNER Support:

        First of all: It’s really nice that you’ve updated this article! I guess you help many users with that.

        Meanwhile I solved my problem, and wrote my solution in an email to Amit Agarwal, but he seems to be very busy.
        Since I come from Germany I don’t get “blogspot.com”-Domains in my Google search results, but “blogspot.de”. Others in German-speaking Europe get also different TLDs like “blogspot.at” or “blogspot.ch”. That is a problem for the template code. I could fix that simply by changing these lines:

        $tld_fix = preg_replace("/blogspot\.[a-zA-Z0-9]+/", "blogspot.com", $old_url);                                                          
        $permalink = explode("blogspot.com", $tld_fix);
        

        With this fix it should work all around the world. Maybe you can implement it in your post; it might be useful for some people.

        Cheers, Marco

        • http://www.wpbeginner.com/ WPBeginner Support

          Thanks Marco for this really useful fix. We have updated the article to include this.

      • nil

        Hey,

        I have the same problem. Tried your script but when I go to an old posting I just get redirected to my first page, not to the post.

        Regards
        nil