Blogger To Wordpress Redirection Plugin with 1-to-1 Mapping Between Old and New Blog Posts!
If you have imported your blog from blogger (blogspot.com) then you might be redirecting visitors from your old blogspot blog to your new wordpress blogs HOMEPAGE. While this approach ensures that you get all the traffic redirected from your old blog to new blog, a visitor may feel lost! What if a person is referred to your old blog via search engine or other link listings?
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!
This plugin assumes following things:
- You used wordpress blog importer while importing your blogspot beta blog.
- You put redirection code in your old blogspot blog. An example of code is attached below. I strongly recommend using it only.
- You have imported only one blog. In next version I will remove this restriction so that you can import (or say merge) two or more blogspot blog into one new wordpress blog.
Installation (Blogger Blogspot Part):
- Log into your blogger account.
- Select old blogspot blogs template/layout.
- Go to “Edit HTML” tab.
- Put following codes there with one important change and save changes.
(Important: Replace http://www.devilsworkshop.org/ in following code with your wordpress blog URL)
<html>
<head>
<script LANGUAGE="JavaScript">
<!--
window.location.replace("http://www.devilsworkshop.org/");
-->
</script>
<noscript>
<meta http-equiv="Refresh" content="10; URL=http://www.devilsworkshop.org/"/>
<meta http-equiv="expires" content="10"/>
<meta name="Description" content="301 moved permanently"/>
<META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW"/>
<META NAME="GOOGLEBOT" CONTENT="NOINDEX, FOLLOW"/>
</noscript>
<title>301 moved permanently</title>
</head>
<body>
<center>
<h1>Devils Workshop</h1>
<p>has been moved to new address</p>
<a href=" http://www.devilsworkshop.org"> <h1>http://www.devilsworkshop.org</h1></a>
<p>Sorry for inconvenience... </p>
</body>
</html>
Installation (Wordpress Part):
- Click here to download Blogger To Wordpress 1-2-1 Redirection Plugin. A file rbBloggerToWordpress.zip to your PC. Unzip it.
- Upload rbBloggerToWordpress.php into ‘wp-content/plugins’ folder.
- Go to plugins option under wordpress’s Admin panel. You will see a “Blogger To Wordpress Redirector” Plugin Listed there.

- WAIT! Do NOT click Activate. First Click Edit.
- On next screen put your old blogspot blog address next to $oldBlogURL variable! For ease search rb286.blogspot.com and replace it with your blogspot address. Sorry for this manual work, I will automate this step in next version.
- Then click Update File link their to save changes.
- 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:
- Popular desktop blogging client Windows Live Writer stops working if you use this plugin. But there is temporary workaround. Disable the plugin & paste following code into current templates index.php [i.e. Main Index Template] before everything else! [Path: Admin Dashboard >> Design >> Theme Editor]
#Code: [Note: Replace rb286.blogspot.com with your old Blogspot address]
<?php
$oldBlogURL = "rb286.blogspot.com";
$ref = $_SERVER['HTTP_REFERER'];
$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].' ') ;
exit;
}
}
?>
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 old.blogspot.com/cool-post is mapped to new-wordpress.com/cool-post
Now observe journey of a user…
- User requests old post - old.blogspot.com/cool-post
- old.blogspot.com send user to new-wordpress.com.
- Now at new-wordpress.com, second parts get activated as visitor is coming from old.blogspot.com.
- Second part checks for HTTP Referrer information from where it finds URL of old.blogspot.com/cool-post.
- Using this information second part at wordpress finds new-wordpress.com/cool-post 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]
If you like this post, you may subscribe to my RSS feed or email alerts to receive automatic updates in future! Thanks for reading... :-)
Related Posts...
- Simplest Guide to show Adsense Ads after each Blog Post
- How to get list of plugins installed on any wordpress blog!
- Tecchnorati: Organise Blogs Posts With Tags Into Sidebar!
- Proxy 4 Blogger (Blogspot)
- Blogger + Adsense Hack: Show ads after each post to earn more from your blogger beta blog!
- Happy Birthday Blogger!
- Creating Spam-Free Contact Page in Minutes [Wordpress Plugin]
- Showing Adsense Banner Ads in Blogspot Blogs [Blogging Tips]
- Wordpress 2.5 FAQ - A Must Read For All Wordpress Users!
- Show AdSense Ads After First or Every Post in Wordpress Blogs [How-To]



















Deepak said, on January 20, 2008 @5:22 pm
Wow bro so you write wordpress plugins also, cool yaar, you are too good with this stuff, i will gonna need this plugin soon. thank you very much for your efforts and sleepless night.
Rahul Bansal said, on January 20, 2008 @6:49 pm
@Deepak
This is my first plugin. Glad to know that you find it useful
Corpse said, on January 21, 2008 @1:40 am
hey rahul is this haloscan commenting system???
Rahul Bansal said, on January 21, 2008 @3:15 pm
@Corpse
No.. This is not any sort of commenting system!
Corpse said, on January 22, 2008 @12:56 am
Ahh rahul you got me wrong re…
Actually this is off the topic but actually I wanted to ask about the inline comment system you use on DW.
I searched DW a lot but couldn’t find anything about it, looks you never shared this with us
Rahul Bansal said, on January 22, 2008 @2:39 pm
@Corpse
The comment we use here comes built-in with wordpress!
If your point is how I highlighted my comments then I use a small plugin and little bit editing of code.
I think u r comparing this with blogspot blogs where people need to click on link post comment. Then they go to fill up comment form on next page and so on…
Corpse said, on January 22, 2008 @11:38 pm
absolutely right bro… So could you tell a way to get a similar kind of comment layout for the blogger thingy…I hate the popup or newpage comment system..
Rahul Bansal said, on January 23, 2008 @12:38 am
@Corpse
Anyway I will check again to see if there is any new development. If I find something I will surely post it on this blog. 
I left blogger around six months. At that time there was no good solution to do this!
EvilScienceChick said, on January 25, 2008 @11:43 am
When I activated the plugin, my site disappeared and I got this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/evilscie/public_html/wp-content/plugins/rbBloggerToWordpress.php:12) in /home/evilscie/public_html/wp-includes/pluggable.php on line 391
Louiss said, on January 26, 2008 @3:01 pm
Hi Rahul, I get a problem here! I have use bloggingsecret.blogspot.com with a domain name previously; bloggingsecret.net. Then yesterday I transfer blogger to wordpress, I successfully transfer everything to wordpress, and now I wanna transfer the traffic too. But this plugin is doesnt work when I change in file with bloggingsecret.blogspot.com. So can you please guide me on this issues? Wish to get your reply asap.
p.s: I also change to permanentlink to without date: /%postname%/ only. Hope you can check it out. Wait for your respond.thanks for your time.
Rahul Bansal said, on January 29, 2008 @12:18 am
@EvilScienceChick
First sorry for late reply as I was away on vacation…
Now in ur case this plugin is conflicting with pluggable.php and the problem is in pluggable.php file as mentioned in a topic on wordpress forum. [Link]
Read that topic and check if things works out for u…
Rahul Bansal said, on January 29, 2008 @2:22 pm
@Louiss
First I am sorry for late reply as I was on vacation…
Now permalink change should not affect working of this plugin as its interacting directly with wordpress database!
Anyway answer following question as I do not have adequate details…
1. Can you access your wordpress database via phymyadmin or any other interface?
2. How you imported your old blog to new blog? Which tool u used?
3. What happened after activating plugin?
>>Nothing
>>Redirection failed (visitors from old post went to new blogs homepage)
>>page nor found error recieved
Also note anyone going to your old homepage will continue to see your new homepage!
Its Homepage ==>> Homepage
& Post ==>> Post redirection!
Please provide any other details if any so we can find a solution ASAP!
Louiss said, on January 29, 2008 @4:44 pm
Thanks for reply man, here are the answer:
1. I can access through phpmyadmin
2. First time I import my content to bloggingsecret.wordpress.com then download the files, after that upload at bloggingsecret.net. BUt it’s limited, coz I have more than 300 posts, so I do another work, use feedpress to feed the latest content to my blog.
3. Yes, I got error, cant login to my wp-admin!
Rahul Bansal said, on January 29, 2008 @7:50 pm
@Louiss
Means u had blog first at , then u moved to bloggingsecret.wordpress.com and finally to bloggingsecret.net?
Act this plugin is not capable of taking care of your situation!
Can you afford to do a bloggingsecret.blogspot.com to bloggingsecret.net import?
Also let me know how many post u did posted at bloggingsecret.wordpress.com??
I wil try to figure out things but buddy cant assure you about solution…
Louiss said, on January 29, 2008 @8:38 pm
Thanks rahul for your feedback. Yes, I not directly import it to bloggingsecret.net.
bloggingsecret.wordpress.com have only 165 posts.
I cannot transfer directly to bloggingsecret.net due to some error that I cant fix in wordpress files.
do you mean I need to imporant all over again? If I need to delete, do you have any plugin recommended to delete all my posts just a click?
Rahul Bansal said, on January 29, 2008 @8:56 pm
@Louiss
With phymyadmin interface you can delete whole database in one click!
Or you can just drop tables like wp_posts but if u can drop entire database (means complete reinstallation) that will be great…
by the way what error message you got while importing from bloggingsecret.blogspot.com to bloggingsecret.net directly??
Check official wordpress article on import also..
If you can afford complete reinstallation that will be the best…
lets try resolving whatever error you are getting while doing import!
BL said, on February 24, 2008 @10:50 pm
I did the same as Louiss:
x.blogger–> x.wordpress.com –> x.com
Because of some php/ssl error, and now I can’t redirect the posts
any thoughts on how to solve this?
Rahul Bansal said, on February 27, 2008 @11:13 pm
@BL
Now as I asked Louissm if your blog is not old then consider making a fresh migration from x.blogspot.com -> x.com
First sorry for late reply buddy…
Rest catch me on messenger I will be able to help you… My Email Id: rahul@devilsworkshop.org
I really want to fix this issue buddy… So please respond!
Cody said, on March 2, 2008 @8:45 pm
I am currently in the process of moving my Blogger site over to WordPress, but because I used Windows Live Writer with an FTP setup, I can’t use WordPress’ “Blogger Import” functionality. I’m having to do each post manually through Live Writer…unless someone has a really good suggestion.
Question - will your plugin work for me after I make the switch since I couldn’t use the WP import tool?
Thanks,
Cody
Rahul Bansal said, on March 2, 2008 @9:46 pm
@Cody
The plugin makes use of metadata generated while importing from Blogger to Wordpress by importer tool.
So I guess it can not work as it is in your case.
Still I guess this plugin can be fixed.
All I need is more data. So let me know when you done with migration.
BL said, on March 5, 2008 @5:23 am
Sorry, I’ve been away from computers for the last days.
I’ve been able to import my old blog, from Blogspot, to my new self-hosted WP, and got it working (95% - Some links were not a perfect match).
However I’ve decided to start my new blog from scratch, so I have given up on the import. :/
Thank you for your help
Rahul Bansal said, on March 5, 2008 @7:07 pm
@BL
By the way there is no harm importing your old work on new blog.
If u need any help let us know!
As you wish buddy…
Just don’t keep it on old and new blog at the same time…
Best of luck for new blog…
-Rahul
Skittle said, on March 22, 2008 @8:45 am
Hi there, I think I’m having a similar problem. I keep getting this error when I try clicking a link to my old blog via Google…
Warning: Cannot modify header information - headers already sent by (output started at /home/yousou5/public_html/wp-content/plugins/rbBloggerToWordpress.php:12) in /home/yousou5/public_html/wp-content/plugins/rbBloggerToWordpress.php on line 46
Any help would be awesome.
Rahul Bansal said, on March 22, 2008 @5:24 pm
@Skittle
May I know other plugins which you are using on wordpress blog.
By the way did you tried “temporary workaround” codes mentioned above?
Skittle said, on March 23, 2008 @4:19 am
Well, I tried the temporary workaround code and it didn’t help. I have some redirect code that is sending visits to my home page, but when I activate this plugin it gives me errors like that. Also, I have to delete the plugin file via FTP to deactivate it as it gives me a similar error (with pluggable.php instead).
I am also using these things…
Dagon Design Form Mailer
Simple Tags
Sticky Post
Rahul Bansal said, on March 24, 2008 @1:42 pm
@Skittle
Hey bro thanks for reverting and sorry for late reply.
Now I am just in process of releasing newer version of this plugin.
You can expect it within 24 hours and I guess it will fix many issues you friends are having.
In mean time, it will be great if you post your redirection code here!
Rahul Bansal said, on March 24, 2008 @5:20 pm
@Skittle
Can you check new version of this plugin?
Let me know if its work for you. Act I never got header error so not sure…
http://downloads.wordpress.org/plugin/blogger-to-wordpress-redirection.1.1.zip” rel=”nofollow”>Click here to download!
Dunn said, on March 26, 2008 @12:53 pm
I’ve been using Blogger custom domain for a year. And I just transfered the blog to selfhosted wp. I had imported all the posts from blogger to wp using import in wp. Everything is set up already. The homepage looks fine. But when I clicked the individual post that i imported from blogger, it viewed with the old blogger layout instead of new wp theme. I already using your plugin but it doesn’t help. Even the transfer team from my hosting company (which I paid them for the transfer service and end up with this problem) don’t know how to solve this. Anyone know how to fix this? Please help!
Rahul Bansal said, on March 26, 2008 @4:45 pm
@Dunn
First I guess you should not have gone to any hosting company for transfer as its simple process…
Anyway can you check database tables yourself?
And one more thing there is no domain name change in your case. So this plugin is not for you.
Also try to give me some post urls which shows old blogger template!
Dunn said, on March 26, 2008 @10:19 pm
Hi Rahul! Thank you for your response.
I don’t understand about wp, that’s why I used their service.
I don’t know how to check database tables. Can you be more specific or guide me for that?
I had deactivated your plugin, cause it gave me error.
My original link that I’ve been using for the past year was /%year%/%monthnum%/%postname%.html. since it gave me error, i changed the permalink to /%year%/%monthnum%/%postname% which I had to risk loosing all the links back to my site. You can see the example of the error in this link :
http://www.myinterestingfiles.com/2008/03/balance-mobile-concept.html
this is the recent link :
http://www.myinterestingfiles.com/2008/03/balance-mobile-concept
I tried using the permalink redirect, but it still wont redirect to the new permalink.
Rahul Bansal said, on March 27, 2008 @6:19 pm
@Dunn
Sorry for late reply dude..
Now I checked links given by u and also googled for help!
I have reached to following conclusions…
Now it seems you are new to wordpress so better not to play with database yourself so soon. Also there are so many things to check that you will need an expert to do this job.
You can call any friend for help. I won’t mind helping you but better check if you have a friend who is good at wordpress! Whatever happens don’t call earlier guys again.
Dunn said, on March 27, 2008 @7:14 pm
“Same content at two different URL means bad SEO, loss in traffic & revenue. Also it creates user confusion in your case due to different designs.”
Is this mean I should change the permalink back to the old one?
I will contact you directly to your email, if you don’t mind.
Rahul Bansal said, on March 28, 2008 @2:57 pm
@Dunn
Changing permalink structure will not be enough.
By the way better contact me on mail or gtalk.
My id - rahul286@gmail.com
Xiawa said, on June 5, 2008 @10:08 am
Hi Devil
many thanks to your plugin
but i found that post-to-post redirect have broken link problem
hope to hear u soon
Rahul Bansal said, on June 8, 2008 @6:39 pm
@Xiawa
Now can you please explain more about broken link problem?
Sorry for late reply buddy as I was away from this blog…
What do you mean by?
any examples, etc???
Please let me know in detail as I am looking forward for developing next version of this plugin…
Xiawa said, on June 19, 2008 @7:34 am
Hi devil, thanks for your reply
lets say my old blog link is http://edeneve.blogspot.com, and i use this plugin to redirect all the posts to http://xiawa.my,
for blog-to-blog. it works
but when post-to-post,it become 404 error after redirect
and i found that after i activate this plugin, some .php file can’t show properly.
Rahul Bansal said, on June 20, 2008 @7:46 pm
@Xiawa
There are some issues with plugins…
So better use codes given in temporary workaround section in above post.
Also you must put proper redirection code at old blogspot blog. An example code is also provided in most.
Please note that you need to modify codes as per your domains names.
If you need any help, please feel free to reply back…
Jimmy said, on July 18, 2008 @9:48 pm
I wrote up a guide that takes into account forwarding the individual posts from your blogger account and everything you need to do to make that happen. It is much clearer than this, and I think it’s easier to implement. It also in general just gets users from your old site to your new one in a happy way, beyond the individual posts. For all you lost users that were like me just a few days ago, I highly recommend you take a look.
Successfully Forwarding Blogger to Wordpress
Rahul Bansal said, on July 20, 2008 @3:54 pm
@Jimmy
After carefully going through your and your friends post, I have observed that…
Also read this official article from Google on Javascript redirects, which further makes it clear as why one should not use your codes.
So buddy if you are newly moved better use my plugin to save your PageRank and normal traffic!
Jimmy said, on July 21, 2008 @10:12 pm
Rahul,
I had taken a look at your plugin before deciding on my solution. Why? I can’t understand how to use your plugin and really I don’t see how it’s any different from my solution. Let me explain.
You provide little explanation of how to actually redirect posts from blogger. You simply say that the plugin “assumes that you are using ‘javascript’ or ’static links’ to redirect users to your new blog”. Most users, myself included when I was looking for guides on this, do not know what this means exactly or how it’s implemented. Beyond that, the example code you provide for redirecting blogger is javascript! You are using a javascript redirect! And it is also nofollow and noindex. Again, how is link juice being passed?
Google may not like javascript redirects, but when you noindex your blog it doesn’t matter either way.
If your plugin works and passes on link love, I’d love to use it. I’d gladly throw away the guide I just wrote up and just use your solution. But I simply don’t see how your solution is really any different from mine. Beyond that, I feel overall my instructions are clearer than yours.
Nothing is fool proof and I’m sure your solution works. I just don’t understand how it works as you say it does.
Rahul Bansal said, on July 21, 2008 @11:13 pm
Hi Jimmy,
Just update above post. I admit that there were many things which were not clear. I tried my best to clean it up.

Also included an example in it. Please go through it again.
Sorry for confusion…
Thanks,
-Rahul
Jimmy said, on July 22, 2008 @2:57 am
Rahul,
It’s all good, I just want to make sure users are clear. The redirects you are using are not 301. They are 200 and use instant Meta Refresh, which Google associates with spam. You want to give at least a 3-4 second delay before redirecting users because if the googlebot sees an instant refresh it will assume you are trying to cloak.
You can find out what kind of redirect your site is using by going to http://www.webrankinfo.com/english/tools/server-header.php
Again, you are using javascript to redirect. In order to have google know what to follow on a post by post basis you’d have to edit the header information on each individual post, which is prohibitive for most people. You also don’t explain where to put the javascript code within your blogger HTML, which I imagine is pretty critical information.
To be clear, your method absolutely will not pass on link juice. As far as I know, it actually isn’t possible to do nice clean 301 redirects from blogger. Your method is actually remarkably similar to mine, and I guess it would just depend on which type of implementation people would prefer.
Rahul Bansal said, on July 22, 2008 @2:32 pm
Hi Jimmy,
Here are answers again…
This service http://www.webrankinfo.com/english/tools/server-header.php ignores all type of redirection, so use LiveHttpHeaders if you really want to inspect header!
Next javascript is to redirect HUMANS which will otherwise see META tag redirection. To fill the difference disable javascript in your browser and check my old blog!
About putting codes in blogger template…
You have to replace entire template code with small chunk of code I given above.
About “edit the header information on each individual post”…
Do you really think I am insane!
I never said anything like that. All code need to be put at blogger are given in above post itself.
By the way if your method was that good why were you looking for an alternative? And why don’t you use it only?
Rahul Bansal said, on July 22, 2008 @3:09 pm
Hi Jimmy,

Thanks for 0 second redirection warning.
Yep it may be consider as a spam so changed it to 10 second.
Also updated post again.
I guess proper SEO is not possible. I have to investigate the issue further.
Jimmy said, on July 22, 2008 @10:00 pm
I think we’re misunderstanding each other a little bit, but that’s ok. Just to answer one of your previous questions, I was never looking for an alternative to my solution.
Originally I was looking for a solution for our own blogger blog, and came across your blog. The original instructions were too vague (you’ve mostly fixed that), and so I went on to other ones, nearly all of which weren’t that good of a solution. I figured that I would help people by creating my own version that was ultra-clear. I thought that if I had found a guide like mine when I was first looking, it would have saved me a lot of time. So that’s why I’ve been spreading it around.
I think you’re solution would work just fine, and as I said, it works very similar to mine in terms of the way it redirects from blogger. I just didn’t realize how it worked in the beginning. Your further explanation I think will help users coming to your blog.
Rahul Bansal said, on July 24, 2008 @12:37 am
@Jimmy
Ya… But I am still hopeful. Only think now I need is somehow to get “referrer” information at wordpress side, even if javascript is disabled.
That way this will work but chances of finding a way around are very low!
Because anything at bloggers side can be done using only javascript and meta tags.
They don’t allow us to do any server side scripting…