How to Move Your Posts From Blogger to WordPress

Posted by

When you suddenly realize that you desperately need to move from Blogger to WordPress and you don’t want to start typing your posts all over again. Here’s the straight forward way:

The Transition…From Blogger to WordPress

  1. Get your Website — Read A Total Newbie’s Guide to WordPress
  2. Export your Blogger blog by visiting Settings » Other page.
  3. Import Blogger to WordPress by visiting Tools » Import page in WordPress admin area.
  4. Setting up permalinks on your new WordPress blog.
  5. Setting up redirects for Blogger visitors to WordPress posts
  6. Set up redirects for RSS feeds
  7. Import your images from Blogger to WordPress media library.
  8. ……….

How to Export your Blogger Blog

from blogger to wordpress

  • Go to Settings –> Other
  • In the settings page, click the Back up Content button. Clicking it will export all your blogger posts in XML format. After you click the button, you’ll be prompted to save the file
  • Click Save to your computer to save the .xml file

How to Import From Blogger to WordPress

WordPress has a dedicated Blogger import plugin, so it’s very easy.

  • Inside your WordPress admin dashboard, navigate to Tools –> Import
  • On the next page, you just need to select the Blogger option
  • After selecting the Blogger option, you’ll be asked to install the official wordpress.org Blogger Importer plugin. Click the Install Now button to do that. It should automatically install in just a few seconds
  • WordPress will automatically install the plugin. After that’s done, click on Activate Plugin & Run Importer
  • Click Choose File and then navigate to the .xml file you exported from your Blogger site
  • Select the file and then click Upload file and import to import all your Blogger posts into WordPress. All the post and page data from your Blogger site will get automatically imported.
  • Once you’ve selected the author that you want, just click Submit.

How to Set Up Permalinks

  • Permalinks are essentially the unique URL for each post or page.
  • To set your WordPress permalinks,  go to Settings –> Permalinks
  • To try to mimic how Blogger structures URLs, select the Month and name option. It’s essential that you pick this option so that the redirect code you add in the next few steps will properly work.

Set Up Redirects for your Blogger Visitors

You still need to redirect anyone who goes to one of your Blogger URLs to the right post on your new WordPress site. 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.

  • Go to your Blogger blog’s settings and click Template
  • On the template page, scroll down to the bottom of the page and click on Revert to Classic Template link.
  • 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 http://www.example.com with your own domain name.
  • In that box, delete all the existing code and replace it with this code: 
    <html>
    <head>
    <title><$BlogPageTitle$></title>
    
    <script>
    <MainOrArchivePage>
    window.location.href="http://example.com/"
    </MainOrArchivePage>
    <Blogger>
    <ItemPage>
    window.location.href="http://example.com/?blogger=<$BlogItemPermalinkURL$>"
    </ItemPage>
    </Blogger>
    </script>
    
    <MainPage>
    <link rel="canonical" href="http://example.com/" />
    </MainPage>
    
    <Blogger>
    <ItemPage>
    <link rel="canonical" href="http://example.com/?blogger=<$BlogItemPermalinkURL$>" />
    </ItemPage>
    </Blogger>
    </head>
    
    <body>
    <MainOrArchivePage>
    <h1><a href="http://example.com/"><$BlogTitle$></a></h1>
    </MainOrArchivePage>
    <Blogger>
    <ItemPage>
    <h1><a href="http://example.com/?blogger=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>
    <$BlogItemBody$>
    </ItemPage>
    </Blogger>
    </body>
    </html>
  • Click Save.

Setup Redirects for WordPress

You still need to setup redirection on your WordPress site so that users are redirected to the proper posts. To do so, you need to add the code below to your WordPress site’s functions.php file:

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 );
exit;
}
}

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()) {
$query->the_post();
$url = get_permalink();
}
wp_reset_postdata();
}
return $url ? $url : home_url();
}

This code will set up a 301 redirect, which is the most SEO friendly type of redirect. It will ensure that Google knows your posts have permanently moved and they should give the same weight to the new post as the old post had.

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

Set up redirects for RSS 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.

  • 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 http://your-site.com/feed/ (replace your-site with your own domain name).

Import your images from Blogger to WordPress media library.

Importing your posts should automatically include all the images, but if any got missed in the process, you can manually import them into your media library to ensure posts look the same. Basically, this is it.

Welcome to WordPress! Start Blogging!

Zee

Welcome to The Pishon Design Blog! The exciting digital space of Zainab Sule, who seems to be quite at home with Code and guitars. This blog focuses on latest web design trends, apps, and everything digital!

More Posts - Website

2 comments

    1. Good idea, Zoriana. I guess it all depends on the angle one wants to take. I’d prefer knowing how to do it from scratch, to avoid a potential plugin error.
      – Z

Comments are closed.