Blogger To WordPress Traffic & Permalinks Redirection Plugin

Major Update: This plugin’s new version has been released with many **new features **like:

Link: Blogger to WordPress Redirection Plugin

**Update: **This plugin maintains permalinks but in case you want to preserve Google Pagerank and other search engine ranking, please read this new complete tutorial first.

So this plugin just takes care of this part. It checks for which post people were looking on old blog and then redirect them to same post but on new blog! See following picture which will give you brief idea about what you can accomplish using this plugin…


This plugin assumes following things:

Installation (Blogger Blogspot Part):

  1. Log into your blogger account.
  2. Select old blogspot blogs template/layout. If you are using new custom layout, use **“Revert to Classic Template” **option on Edit HTML.
  3. Go to “Edit HTML” tab.
  4. Put following codes there with one important change and save changes.

(Important: Replace ** **in following code with your wordpress blog URL)

<script LANGUAGE="JavaScript">
<meta http-equiv="Refresh" content="10; URL="/>
<meta http-equiv="expires" content="10"/>
<meta name="Description" content="301 moved permanently"/>
<title>301 moved permanently</title>
<h1>Devils Workshop</h1>
<p>has been moved to new address</p>
<a href=""> <h1></h1></a>
<p>Sorry for inconvenience... </p>

Installation (WordPress Part):

  1. Click here to download Blogger To WordPress 1-2-1 Redirection Plugin. A file * *to your PC. Unzip it.
  2. Upload rbBloggerToWordpress.php into ***‘wp-content/plugins’ ***folder.
  3. Go to *plugins ***option under wordpress’s Admin panel. You will see a “Blogger To WordPress Redirector”** Plugin Listed there. Blogger_to_Wordpress_redirector
  4. WAIT! Do NOT click Activate. First Click **Edit. **
  5. On next screen put your old blogspot blog address next to $oldBlogURL variable! For ease search and replace it with your blogspot address. Sorry for this manual work, I will automate this step in next version.
  6. Then click Update File link their to save changes.
  7. Go back to plugins page and this time Activate the plugin!

That’s it! This plugin will now onwards map your old blogspot post to new wordpress posts on 1-to-1 basis.

Known Issues:

#Code: [Note: **Replace with your old Blogspot address]**

<span class="hiddenSpellError">oldBlogURL = "";
$refarr = explode("/", $ref);
if ($refarr[2] == $oldBlogURL ){
  $bloggerurl = '/'.$refarr[3].'/'.$refarr[4].'/'.$refarr[5];
  $sqlstr = " SELECT wposts.guid FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'blogger_permalink' AND wpostmeta.meta_value = '".$bloggerurl."' ";
  $wpurl = $wpdb->get_results($sqlstr, ARRAY_N);
  if ($wpurl){
      header( 'Location: '.$wpurl[0][0].' ') ;

Example :: How this plugin works?

First note that,  there are two parts – blogger part and wordpress part.

Also for the sake of simplicity lets assume is mapped to

**Now observe journey of a user…

  1. User requests old post –
  2. send user to** **
  3. Now at, second parts get activated as visitor is coming from
  4. Second part checks for HTTP Referrer information from where it finds URL of
  5. Using this information second part at wordpress finds and sends it to browser.

In fact, the whole process is so transparent that if a user have address bar disabled he will never notice any sign of redirection process. 😉

About Javascript code at blogger end… its for non-standard browsers who don’t respect meta tags.

About NOINDEX FOLLOW, it tells crawler not to index blogspot page but FOLLOW redirect. Also NOINDEX will instruct crawler to drop already indexed version of page. We need to use NOINDEX because new wordpress post have same content as old blogspot post. This is to ensure that we explicitly handles duplicate content problem.

Let me know if I am missing something as this is my first wordpress plugin.

**Credits: **I am grateful to Charles and Live HTTP headers firefox extension for their help while coding this plugin!

[Updated: 2008, July 20 – After my  Jimmy’s comment]

About Author

Rahul Bansal

Rahul Bansal

I am a geek (wordpress), blogger (tech) & entrepreneur (rtCamp)