Migrate a Blog from Blogger to Wordpress

Blogger is without a doubt a good platform for those who wanted to start blogging. However, it does not offer complete control to the user. This is the main reason why some Blogger users want to migrate to self-hosted WordPress site.

General Steps:

If you already have your hosting and WordPress site, proceed to the last step. If not, please go to this page(for blog setup with hosting):   http://writers.academy/setup/for/travelicious-world/ then proceed to step 3 when done.
  1. get a hosting account
  2. install wordpress
  3. migrate blogger to wordpress site

Migrating Blogger to WordPress

Go to Blogger Dashboard

1

2

3

4

5

Backup Content will be downloaded to your Computer

6


Go to your WordPress Dashboard

 

7

8

9

10

11

Upload the file you downloaded from Blogger earlier

 

12
13
14
15
16

Check your WordPress Site, it should now contain the articles from Blogger

 


 

Dealing with Images

Images are not included in the export so check posts from blogger and upload new relevant pictures. If you still have a copy of the old image, then simply upload it on WordPress.

17

19

20

21

22

23

24


Link Structure

Since you are transferring posts from Blogger, it is very important that your WordPress Link Structure is very close to the one in your Blogger site.

Go to your  Wordpress Dashboard

 

25
The link structure should be close to this

26

27

29

30


Setting Redirection from Blogger to WordPress

Go to Blogger Dashboard

31

Scroll down to the bottom

 

32

33

34

Replace everything in the area to the code below, then   replace ‘ http://www.example.com ‘ with your own domain name.

<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>

Tip: So you don’t miss changing anything, copy this ‘ http://example.com/ ‘ press “CTRL + F” on blogger then paste (CTRL + V)

35

All you need to change will be highlighted

36

To avoid typo problems, go to your site and copy url. Then paste it on the code as needed.

37

38

To check if everything worked, go to your blogger site.  It should automatically be redirected to your new WordPress site

Function PHP Page on WordPress Site

A code has to be added on your WordPress Site that deals with how redirects are handled.

Go to your WordPress Dashboard

 

Image
51
Press CTRL + F , then type on the search bar ‘functions.php
42
Tip: Before Editing Make sure to Create a copy of the current code so when problems occur, you still have a copy of the working code.

Creating a Backup of the functions.php code

Highlight the current code, then create a text document file.
43
44
45

After doing the backup, scroll down to the buttom of the code and paste the following :

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();

}
46
To check if everything is done properly, go to your blogger site. It should automatically be redirected to your new WordPress site

RSS Subscribers

Go to Blogger Dashboard

47

48

49

50

With this, all your Blogger subscribers will be redirected to your new WordPress site as well.