How To move Blogger to WordPress With a Custom Domain

How to Move Blogger in Custom Domain to WordPress

Want to move Blogger with custom domain to WordPress, without losing the search ranking. This article will help you to move blogger blog with custom domain name for example “yoursite.com” to the WordPress in same domain. Just follow the below steps.

Step 1: Removing Custom Redirection from Blogger

As you are using a custom domain and redirected your blogger blog to it, first thing to do is to delete that redirection. For this login to your blogger dashboard and click on Settings. Under Publishing you can the custom redirection and delete this by clicking the cross sign.

custom domain redirection blogger

Step 2: Update DNS records for in your domain

As you have linked your domain with blogger, you have added some CNAME records to your DNS. Now you have to remove those and add the CNAME records for WordPress. Also delete the A records, which pint to the IP address of your Web host.

Step 3: Install WordPress in your Domain

Now you have to install WordPress in to your domain. For this login to your Cpanel and there you can see the option for installation. I have already explained this installation process in another post. So take a look at it.

I have been using Bigrock hosting service and satisfied with them . And the examples in this site were mainly on those BigRock.in website.

Step 4: Move Blogger Contents to your Computer

After successfully installing WordPress on your site, you can now move blogger contents / import the contents of your blog to WordPress. For this, first you need to export the contents from your blogger. Login to your blogger and click on Settings >> Other >> under Import & back you can see the button “Back up content”. Its for taking back up of your entire blog content like posts, pages, comments etc.

export backup move blogger contents

Click on that “Back up content” button and one pop up will open and in which click on “Save to your computer”. This will download the backup of your blogger in XML file. Now you have to import this file to WordPress.

save blogger backup to computer for migrate to wordpress

Step 5: Import Blogger contents to WordPress

Now you can move blogger contents to WordPress. For this login to your WrdPress dashboard and click on Tools >> Import >> then you can see the option “Blogger”. You have to install this plugin for moving your blogger contents. Just click on that Blogger option and one pop up will open asking to Install that plugin. Click on “Install Now” button and WordPress will install that plugin.

After Installation, it will show a message saying that plugin is successfully installed. Now you have to activate that plugin and run the importer.

blogger importer plugin wordpress

 

Just click on the link for activating and running blogger importer. You will get an option to upload the exported XML file. Click on that “Choose file” button and select the XML backup file which we exported previously and the click on “Upload file and import”.

 

migrate blogger contents to wordpress guide

 

Now WordPress will import the contents from your blogger and after that it will ask for an author to the imported posts. You can either choose the default author or create a new one. That’s all you have successfully imported blogger to WordPress. But its not the end , now comes some important steps for not loosing the search rank and SEO of your blog.

Step 6: Updating WordPress Permalinks

Default WordPress permalinks are different from blogger and if you don’t change it , you site will loss a good amount of traffic. Because the old blogger links will get 301 redirect errors.  So for changing this go to your WordPress dashboard and click on Settings >> Permalinks >> then change the settings to “Month and Name” .

 

permalinks settings blogger to wordpress maintain search ranking

 

Otherwise you can also select “Custom Structure” and add the following line in the input box. It will also work, as those are same.

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

Step 7: Setting Redirection

Now the question arises that what should do with the blogger account. Should we delete it?? The answer is No. You have to redirect you have to set up a proper redirection to your domain. The visitors landing on your blogger should redirect to the WordPress and then to the exact post which they looking for.

For this go to your blogger dashboard and click on Template. Then scroll down and select “Revert to classic templates”. After changing the template, click on Edit HTML and delete all the HTML codes inside it. Now copy paste the below code snippet and click save template.  Before pasting change the code change the “mysite.com” with your own domain name.

<html>
<head>
<title><$BlogPageTitle$></title>
<script>
<MainOrArchivePage>
window.location.href=”http://mysite.com/”
</MainOrArchivePage>
<Blogger><ItemPage>
window.location.href=”http://mysite.com/?blogger=<$BlogItemPermalinkURL$>”
</ItemPage></Blogger>
</script>
<MainPage>
<link rel=”canonical” href=”http://mysite.com/” />
</MainPage>
<Blogger>
<ItemPage>
<link rel=”canonical” href=”http://mysite.com/?blogger=<$BlogItemPermalinkURL$>” />
</ItemPage>
</Blogger>
</head>
<body>
<MainOrArchivePage>
<h1><a href=”http://mysite.com/”><$BlogTitle$></a></h1>
</MainOrArchivePage>
<Blogger>
<ItemPage>
<h1><a href=”http://mysite.com/?blogger=<$BlogItemPermalinkURL$>”><$BlogItemTitle$></a></h1>
<$BlogItemBody$>
</ItemPage>
</Blogger>
</body>
</html>

Click on the “Save Template” button and you have successfully redirected your site. Now go back to your WordPress dashboard and select Appearance >> Editor >> then open “functions.php” file on the right side. Then copy and paste (at the beginning of the file) the below code snippet in to it.

<?php

function newbies_blogger_query_vars_filter( $vars ) {
$vars[] = “blogger”;
return $vars;
}

add_filter(‘query_vars’, ‘newbies_blogger_query_vars_filter’);

function newbies_blogger_template_redirect() {
global $wp_query;
$blogger = $wp_query->query_vars[‘blogger’];
if ( isset ( $blogger ) ) {
wp_redirect( newbies_get_wordpress_url ( $blogger ) , 301 );
exit;
}
}

add_action( ‘template_redirect’, ‘newbies_blogger_template_redirect’ );

function newbies_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();
}

?>

 

Click “Update file” button and it will save the file. Now the person, who visits the blogger will redirected to WordPress and then he will redirected to the exact post.

That’s all you had migrated the blogger to WordPress successfully. Is this article helpful to you ?? Did you find any difficulty during the steps ? please comment your experience below

Also Read: 

M S Sujeesh

Leave a Reply

Your email address will not be published. Required fields are marked *