Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
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 blog (What’s the difference between self-hosted vs 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 with your own domain name.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en" dir="<$BlogLanguageDirection$>">
<script type="text/javascript">
<MainPage><link rel="canonical" href="" /></MainPage>
 <link rel="canonical" href="<$BlogItemPermalinkURL$>" />
<div style="border:#ccc 1px solid; background:#eee; padding:20px; margin:80px;">
<p>This page has moved to a new address.</p>
<MainOrArchivePage><a href=""><$BlogTitle$></a></MainOrArchivePage>
 <a href="<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a>
</div> </body></html>
<!-- replace 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.

  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]+/", "", $old_url);
$permalink = explode("", $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 ".
  $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 experts 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 »


  1. Rickard says:

    Great guide for directing traffic from blogger to new site. The redirect works perfectly!

    BUT… This does not return a 301 redirect status code!!

    Tried several tools including:

    It returns status code 200.

    So… “without Losing Google Rankings”? – are you sure about that??

  2. Dale Reardon says:

    I have read some warnings on other sites that Google has stopped interacting with the WP importer and you can’t currently import your Blogger blogs.

    Is this true do you know? I see this article hasn’t been updated since last year hence why asking.


    • Angie says:

      I ran into this issue, but instead used a plug in called Blogger Importer Extended and it worked even better with more features.

  3. Shashwat Tiwari says:

    “You’re being redirected to this article because the application you’re using uses OAuth 1.0, and we only support the newer OAuth 2.0 at this time.” says google OAuth page which means blogger importer is not working anymore.

  4. Nevine says:

    Will this affect your adsense a/c and information in it?

  5. Nenad says:

    I have custom domain on blogger… do I have to rename and buy new domain and after that migrate whole blog or stay at same domain? There are about 7.000 posts published at blogger blog.

  6. Karen says:


    So I followed these instructions EXACTLY and everything is redirecting beautifully.

    EXCEPT that ALL of the links to my blog from Twitter, Facebook, Bloglovin, etc, ALL redirect to the same post from last September. I can’t figure out what the heck is going on, which makes it really hard to fix it. Any suggestions???

  7. huislaw says:

    Thanks for the tutorial.
    My pages are redirected correctly.
    But when I try to use the function “Change of Address” in Google Webmaster Tools, it says:

    “We couldn’t find any 301-redirect directives for your site. For more details check the Fetch as Google tool.”

    Is there a way to make the Change of Address in Webmaster Tools?
    Or is it important to inform Google about the change of address?


  8. Chris says:

    I’m unable to import from blogger to WP. I didn’t give me a message; it didn’t do anything after I selected the IMPORT button. The posts don’t appear in the WP site. Help!

    • Nathan Nelson says:

      I had the same problem, this morning. Try using the plugin “Blogger Importer Extended”. That worked for me. :)

  9. amy says:

    hi, has anyone figured out the permalink situation? My transfer is not working and I think it may have something to do with that… my theme uses a custom permalink.

  10. Katie says:

    I’ve completed the instructions above and everything seemed to be right. But, when clicking on an old link on say twitter the link redirects and I get this error “Parse error: syntax error, unexpected T_NS_SEPARATOR in /home/sangla1/ on line 15”

    Not sure how to fix this. Any help would be great!

    • Karen says:

      Did you ever find a solution for this? I’m having a similar problem, except that instead of getting an error, my links redirect to an old post.

    • Arun says:


      I was getting an error code similar to what you’ve posted and after umpteen trial and error, I found, it was caused by the wpb-blogger.php code. I copied it off the webpage and those line numbers in the code were intact.

      When I copied the code by clicking on “View Source” on the top right corner of the code snippet, It started working.

  11. Keshav Saini says:


    I am using custom permalinks structure /%post_id%/%postname% in my wordpress blog so can’t use the permalink structure as specified in the post above. Doing the redirect causes 403 error for my blog. Do I have to change anything in the code to make it work with my current permalink structure?

  12. Xander Lim 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.

  13. Peter Bates says:

    Where is the Post Feed Redirect url located on a hosted site? I see no feed subdirectory in my site.

  14. Raya Ezelle says:

    Yay! Thanks so much. All the old URL’s redirect perfectly :)

  15. cesar says:

    Hi. doesn’t wordpress has a size limit for importing blogger’s xml file?

  16. Jason says:

    I just wanted to thank you for this guide, it has been a great help when working with a client. Even though I had major problems with the Blogger Importer -plugin, rest of the process went smoothly when following this guide. Thanks again.

  17. natachy says:

    i have completed redirecting my blogger to wordpress but the problem is redirecting my wordpress site so users are redirected to proper posts. I’m using a mac, i saved the code into a textile (without making any changes). when I try to upload it into theme directory, it keeps unpacking (not installing). please help

  18. gaurav dutt says:

    I had a blogspot blog and a wordpress Veg Momos and the situation is that i don’t want to import my whole blog to the wordpress, but only few posts without re writing them, i would rather say i want migrate a particular category of posts. What should i do for that ?

  19. sugar says:

    I am making a migration of the BBlogger blog to an existing self hosted WordPress domain. Thus Permalinks are already set to be At Step #2 I should be adjusting my permalinks like you say, but my permalinks are already set. How do I solve this problem without killing the permalinks in the existing WordPress blog? Thanks for any help.

  20. Mike Oplinger says:

    Ok I’m on step #3 and I’m to the part where I select WPbeginner on my blogger page but I don’t have anywhere to select this, all I have is an option to select the order the page shows up in which is currently 0.

    • Shell says:

      I had the same issue. The problem was I had put my wpb-blogger.php file into the /public_html/wp-content/themes/ folder instead of in the folder of the specific theme I was currently using. Perhaps the tutorial could state this a little more clearly?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.