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
Special WordPress Hosting offer for WPBeginner Readers
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 eventually realize that if they want full control of their blog, then 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.

Safely moving a Blogger blog to WordPress

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Step 0. Before You Start

To get started with WordPress, the first thing you would need is a good WordPress hosting company and your own domain name. We highly recommend Bluehost because they will give you a free domain and 50% off their hosting plan (special for WPBeginner users). Bluehost is also an officially recommended hosting provider of WordPress.

If you want a Bluehost alternative, then take a look at Siteground who also offer the same special offer to WPBeginner users.

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

Step 1. Export Your Blogger Blog

First thing you need to do is export your blogger blog’s content. Simply log into your blogger dashboard and go to Settings » Other page. Under the blog tools, click on the Export Blog link.

Export Blogger blog

This will bring up a popup where you need to click on the Download Blog button.

Download your Blogger blog's export file

Your Blogger blog’s content will be downloaded to your computer in an XML file.

Once the download is complete, it is time to import it into your WordPress site.

Step 2. Import Blogger to WordPress

To start importing your Blogger site into WordPress, you need to go to your WordPress admin and visit Tools » Import. On the Import page, click on Blogger.

Blogger importer under WordPress import tools

This will bring up a popup asking you to install the Blogger to WordPress importer. You need to click on the Insall button.

WordPress will now download and install the Blogger Importer plugin for you. Once it is finished installing, you would need to click on the Activate Plugin and Run Importer link to continue.

Activate and run blogger importer

On the Import Blogger screen, WordPress will ask you to upload the XML file. This is the file that you downloaded in Step 1.

Simply click on the choose file button and upload the XML file you downloaded earlier. Next, click on the Upload file and import button to continue.

Upload Blogger export file to WordPress

Now if you didn’t select one of our recommended hosts or your site is really large, you may get an error that your file size is too large. In this case, you would need to increase your maximum file upload limit. If your file is small, then you won’t see any errors.

WordPress will now import your blogger posts one by one. When 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 (you) or create a new author account.

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

Step 3. Setting up Permalinks

Permalinks is the term used for URL structure of individual pages. 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 4. Setting up Redirection

The most important step in moving any website is to set up proper redirection so that users are redirected to your new website.

The important part of redirection is that you want users to land on exactly the same page on the new site which they were trying to access on the old site. Secondly, this also notifies search engines that your old site is moved to a new location.

To successfully move from Blogger to WordPress, you need to set up redirection on two levels.

First, you will redirect Blogger visitors to your new WordPress blog. Second, once users reach your WordPress site, you will redirect them to the exact post they were trying to read.

Let’s first set up redirection on the blogger blog. 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’ textarea. You need to replace everything in this text area with the following code. Make sure that you replace with your own domain name.



   <link rel="canonical" href="" />

    <link rel="canonical" href="<$BlogItemPermalinkURL$>" />

   <h1><a href=""><$BlogTitle$></a></h1>
    <h1><a href="<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>

Save your template, and you have successfully implemented redirection on your Blogger blog.

However, you still need to setup redirection on your WordPress site so that users are redirected to the proper posts.

You need to copy and paste the following code in your WordPress theme’s functions.php file or in a site-specific plugin.

If this is your first time adding code to your WordPress site, then you may want to check our beginner’s guide to pasting snippets from the web into WordPress.

function blogger_query_vars_filter( $vars ) {
  $vars[] = "blogger";
  return $vars;
add_filter('query_vars', 'blogger_query_vars_filter');
function blogger_template_redirect() {
  global $wp_query;
  $blogger = $wp_query->query_vars['blogger'];
  if ( isset ( $blogger ) ) {
    wp_redirect( get_wordpress_url ( $blogger ) , 301 );
add_action( 'template_redirect', 'blogger_template_redirect' );
function get_wordpress_url($blogger) {
  if ( preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts) ) {
    $query = new WP_Query ( 
      array ( "meta_key" => "blogger_permalink", "meta_value" => $url_parts[2] ) );
    if ($query->have_posts()) { 
      $url = get_permalink(); 
  return $url ? $url : home_url();

The code above creates a blogger to WordPress 301 redirect which is what you need to ensure best SEO.

Once you have pasted this code, that’s all you need to do for setting up redirection.

Now anyone visiting a post on your old Blogger blog will be redirected to the same post on your new WordPress site.

Step 5. Redirect Feeds

Your RSS subscribers on the old Blogger site will not be able to notice the switch. That’s why you will need to redirect your Blogger feed to your new WordPress site’s feed.

You can do this by logging in to your Blogger account and then visit Settings » Other page under your blog dashboard.

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.

Usually it is (don’t forget to replace your-awesome-site with your own domain name).

Redirect blogger feed readers to your WordPress feed

Step 6. Import Images From Blogger to WordPress Media Library

When you are transferring blogger to WordPress, the WordPress importer will download images from your blogger posts into the WordPress media library. However, it can fail to download some images. This doesn’t happen often, but it can happen.

But there’s nothing to worry about because you can find and import these images into WordPress. Follow the instructions in our how to import external images in WordPress tutorial.

This will import all images from your blogger into your WordPress Media Library. Once the images are in your WordPress media library, you can easily create image galleries and more.

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 and our WordPress beginner videos.

If you have a friend still using Blogger, then you can show them our comparison on WordPress vs Blogger and convince them to switch over.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

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. Tawnya says:

    I have a question on where you copy the 2nd code on redirecting to wordpress do I just copy the code at the bottom of the functions.php file or is there a specific place on that page to copy the code??

  2. Tawnya says:

    I understand all of this except where do I paste the code in wordpress when you say this?

    ***However, you still need to setup redirection on your WordPress site so that users are redirected to the proper posts.
    You need to copy and paste the following code in your WordPress theme’s functions.php file***

    Do I just copy that code you provided at the bottom of this section on my wordpress or do I need to make sure it goes in a specific spot??

    I hope that makes sense. Thanks for this tutorial

  3. Zara says:

    I can’t find tools or anything in wordpress. Did they update it?

  4. Lyssa says:

    Thank you for this helping tutorial
    i have been read almost full of your blog it’s very informative and helpful

  5. Carla Mota says:

    You are the best!! Thanks

  6. Millo Magnocavallo says:

    Add to previous comment …

    I just looked at the source version of the text that’s been imported and in some cases the img tag is appearing like this:

    for some reason it’s not printing out the src?

    • Paul Wentzell says:

      This happens for me, also. I do see that the images for those posts downloaded to the site directory, but it’s curious why they were not inserted into the src of the post.

  7. Millo says:

    Hey! Thank you so much for a great tutorial / how-to. It worked really well, only that I’ve noticed that some images are not appearing in the imported blog posts. Do you have any idea why that might be?

  8. Sharaj Khan says:

    what about blogger to blogger ??????

  9. Olsi says:

    I followed this guide and it worked very well, but I did a redirect test and it says 302 Moved Temporarily and not 301 as it should be.
    I`m I doing something wrong? Anybody else did a redirect test?

  10. Gianluca says:

    Hi, is it possible to import only several posts from the older blog, instead the entire blog?

  11. Thales says:

    I found a work around…

    I have replaced the code (line 11):

    by the following 3 lines:
    var str = “”;
    var url_old = str.substr(7);

    It works fine and seems that I have kept my google rankings.

  12. Joel says:

    I’m considering this option but am getting stuck on step #1. When I export an xml file from Blogger, the resultant file only includes 200 of my 1030 posts. Why? And what can I do to actually back up ALL of my blog.

  13. Wordpresser says:

    Do you still need to redirect the blogger blog to the wordpress domain if the URL structure including domain, date, article name and .html ending of the URL will all be exactly the same on WordPress as they are on Blogger?

  14. Shelly says:

    I have downloaded the blogger blog and am trying to import the file. It appears to be uploading but then I get the following error: Warning: Invalid argument supplied for foreach() in /home/content/p3pnexwpnas06_data02/87/2994987/html/wp-content/plugins/blogger-importer/blogger-importer.php on line 227
    The blogger blog has almost 2,000 posts. Could the size be the problem? I’m afraid I am a complete newbie and am following directions step-by-step.

  15. Emilie says:

    Thank you so much for such an informative and helpful video! I am totally a code newbie, but with your fantastic instructions, even I was able to get my blogger account to automatically send viewers over to my new domain. I only have one problem– and I think it has to do with the second set of code you had me post into the when the function.php file in wordpress. Rather than redirecting users to the specific article that they are attempting to reference in blogger, it just redirects to my entire, overall website. How can I fix it so that users who are clicking on old pinterest pins, etc, receive the recipe that they are looking for, rather than just a generic site where they have to search for the recipe they want? Thanks.

  16. Fachreza says:

    this is legal for blogger and wordpress ???

  17. Jericho says:

    Thanks for this tutorial. I have a question, I am using custom domain in my blogger blog and this is the same domain I am going to use in WordPress. Do I have to disconnect the custom domain first and use the “” before heading to migration of my blog? If so, this will affect on my google rankings?

  18. Julia Taylor says:

    Do you advise deleting the old blogger blog once the site is redirecting properly? Or should we wait for a certain period (if so, how long?)? Or is it best to leave it up for any reason?

    • WPBeginner Support says:

      It is a free blog, why delete it if its not hurting your rankings? But if you must delete it, then we would recommend waiting for at least 6-12 months.

      • Julia Taylor says:

        Well I guess I am not 100% confident we aren’t going to get hurt for duplicate content, since we are still seeing activity in the “Stats” tab. How do I test to make sure that is not going to happen?

        • Jason Booth says:

          The 301 redirect and canonical tag should alleviate the fear about duplicate content but what I’ve found that this technique is not redirecting mobile traffic.

          Mobile users are getting a different template on Blogger and not being redirected to the new site. I’ve been looking into it but have yet to find how to disable or change the template served to mobile devices.

        • Thales says:

          I had the same issue (mobile users still accessing blogger). I have disabled mobile version in blogger and works fine.

          Log in to blogger; go to template; click ‘update template’; on the top of the page you have the mobile preferences. Click and disable mobile version; then click back in ‘Revert to classic template’ – Done!

        • Julia Taylor says:

          I am glad Jason pointed out the issue that mobile users are not being redirected. Can you guys please help us figure this out? I need the blog posts on mobile to also be redirecting to the new site, which they are not.

        • Julia Taylor says:

          Oops, I missed the comment from Thales. Just did that, and it appears to be working. Thank you Thales!

        • Jason Booth says:

          Thanks, Thales! Fixed it for me as well.

  19. Julia Taylor says:

    I followed all your instructions and everything seems to be working just fine, but we are still seeing some page views in the old Blogger site’s stats tab. Is it tracking the pages/posts that are redirecting to the new self-hosted WP site? Or is something not set correctly?

    • WPBeginner Support says:

      Your blogger blog is not just visited by humans but also by many bots, crawlers, automated scrips, etc. Some of these bots may request a cached version of your blog this will generate a page view in Blogger’s stats. You can see the device information in your stats tab for that particular day.

  20. Samantha says:

    I’m trying to redirect my blog to my new wordpress site, but I’m turning all my blog posts into knowledge base articles.

    How would I modify the code so that redirects to

    The “/knowledgebase” part is automatically added by the plugin I’m using and is not part of the permalinks structure.

    • WPBeginner Support says:

      You can switch the post type to knowledgebase. We are not sure what kind of affect it will have on redirects. Its best if you test it on a local install with demo blogspot blog first.

  21. Ketan says:

    This was probably the easiest explanation of migrating from blogger to WP that I found till date. Thanks for posting. The redirect bit – that is something to do carefully.

  22. Kim Brookes says:

    I wrote a bit ago. You should probably ignore what I wrote because for some reason now it’s working. It’s either working now because I copied the snippet for the blogger template again, and changed the “”s again. Or, because the links embedded on my WP site posts (that were ported from blogger) still have the blogger URLs, which WP interprets by substituting with, which goes 404 on WP.

    That is, in case it’s helpful, the post that was on blogger, now WP:

    included a link in the text to

    which somehow in the migration, or me doing something wrong, got changed into

    and that’s a URL that doesn’t exist (WP with a .html instead of /)

    So, mostly thanks for your awesome site. And ignore my previous comment.


  23. Kim Brookes says:

    Awesome site you have here! I’ve used all sorts of the articles.

    I’ve followed all of the instructions on this “how to switch” page. Most of it is working, but the old links on Blogspot aren’t redirecting to my new domain. They’re going to a 404. This is because the old blogspot URLs end in .html, and the new WordPress URLs end with the post_title/
    as though it’s a directory instead of old-fashioned .html file. I think the issue is with the WP function code, but I don’t know the coding well enough to guess at how to make WP redirect to a (delete the slash, add “.html”) URL.

    Nor do I know how to add the coding to the WP permalink page. I don’t want to mess with this, though because I don’t want “.html” added to all of my new posts. For now, the only think I can think to do is to change the permalink individually on all of my migrated-to-WP blogspot posts. Yuck.

    Thanks for any help you can provide.

  24. Julia Taylor says:

    Thank you SO MUCH for this post…it really helped me! I do have a question. Is it possible to redirect the main blog address to a page on the site? The reason I am asking is because the new blog is just part of site, and redirecting blog reader to the homepage might be confusing. So can can I redirect to, instead of I am a little nervous to go messing with your beautiful redirect code as I do not want to mess it up! Thanks so much!!!

  25. Christene says:

    Before I begin doing this, I need to know something: Once all the content on my Blogger site is imported to WordPress…will all the imported posts automatically go live? Or will they import as a draft status? I wouldn’t want them to go live yet. The reason for the migration would be a stand-by thing, in case Blogger deletes my blog (they’ve already deleted two without any pre-notice to me, claiming they had spam), so I’m afraid they’re going to pull this stunt on my remaining blogs.

    So as a pre-emptive, I’d like to install WP, set it up and import, but keep all the imported content in draft status as long as my blogs are still up. If Blogger notifies me they took down my other main blog, then that’s when I’d switch the WP draft status to published. Will someone please let me know about this? I’d hate to have my articles live on BOTH sites at the same time.

    • WPBeginner Support says:

      All imported posts will go live.

      You can go to Posts and click on the screen options button on the top right corner of the screen.

      Under number of posts to show, select a number higher than the expected number of posts you think you might have. Click on the apply button.

      WordPress will now show all your posts. On the top right corner of the posts list, you will find a checkbox to select all posts visible on screen.

      After selecting all your posts, under bulk actions drop down menu, select Edit and then click on apply button next to it.

      WordPress will now show you bulk editing options. Click on drop down menu next to Status section and then select Draft. Finally click on the update button. All your posts will now become drafts.

  26. Tiffany MacBain says:

    I followed the steps to import to WordPress from Blogger and received the message (on WP) that the import was in progress. How long does the import process take? It’s been 30 minutes so far, and I see none of my Blogger posts on WordPress. Thanks!

  27. Laura McKissack says:

    I wish I had come across this article a long time ago! I can’t believe I just crossed this off my to-do list in ten minutes. I’ve been putting it off forever because I thought it would be hard, ha. Now I have to figure out how to recover all the media files blogger has lost from my old blogs :( Any advice there?

    • Christene says:

      I can’t believe you did this in only 10 minutes, Laura. It would take me at least 10 minutes just to READ through the instructions. And the images of all the HTML coding? And what to do with it? This looks as hard as the dickens.

  28. Shakir says:

    Thanks for the great tutorial .

    But i want to ask that i also want to migrate blogger blog to wprdpress but i have to use the same domain name on wordpress , so what should i have to do for the proper redirection of posts to the new post urls so that the exact post url which is ranking in google should redirect to exact same post of wordpress ?

  29. mahesh says:

    Hello ty for such a great article. I want to migrate my blog to WordPress. The template which I m having right now will it available after migration or I Will have to use other?? And if I loose that template then how can I insert new theme in WordPress?
    Plsss reply waiting for you

    • WPBeginner Support says:

      No Blogger templates are different than WordPress. However, you should be able to easily find a much better theme for your WordPress site.

      • mahesh says:

        I have already bought domain from godadday , now if I migrate to WordPress then how will I can use that in word press? I mean how will I able to transfer domain to WordPress? Pls repl

        • WPBeginner Support says:

          You will need WordPress hosting. Once you have signed up for a hosting account, you will need to edit your domain settings on GoDaddy. Under domain settings locate Name Servers and then change them point to your new WordPress host.

  30. Meghan says:

    Thank you for this great tutorial. If my blogger blog is already being redirected to my .com, are the steps the same when migrating to wordpress? Or do I need to go back to a web address before migrating? Thanks in advance!

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.