B2W-Redirection

This plugin is useful for setting up 1-to-1 mapping between Blogger.com blog posts and WordPress blog posts. This works nicely for blogs with old subdomain address (e.g. xyz.blogspot.com) which are moved to new custom domain (e.g. xyz.com)

Please keep this plugin activated for redirection to work.

Start Configuration

Press "Start Configuration" button to generate code for Blogger.com blog

Plugin will automatically detect Blogger.com blog from where you have imported.


Getting Social is Good

Twitter       Facebook       RSS Feeds

Join Us on Facebook


Promote, Donate, Share...

A lot of time and effort goes into the development of this plugin. If you find it useful, please consider making a donation, or a review on your blog or sharing this with your friends to help us.


Free Support

If you have any problems with this plugin or good ideas for improvements, please talk about them in the support forums.

Latest News from Our Blog

postmeta} where meta_key = 'blogger_blog'"; $results = $wpdb->get_results($sql); if(!$results){ $err_str = '

Sorry… No posts found that were imported from a Blogger.com blog

'; $err_str .= 'Import from Blogger.com first and then "Start Configuration"'; echo $err_str; die(); } $html = '
'; $html .= '

List of Blogs

'; $html .= 'We found posts from following Blogger Blog(s) in your current WordPress installation. Click on Get Code button to generate the redirection code for the chosen Blogger blog

'; $html .= ''; $i=1; foreach($results as $result){ $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $i++; } $html .= '
'.$i.''.$result->meta_value.'
'; $html .= '
'; die($html); } add_action('wp_ajax_rt_b2wr_get_config', 'rt_b2wr_get_config'); /* Redirection Function (!important) */ function rt_Blogger_To_Wordpress_Redirection() { $b2w = (isset($_GET['b2w']))?$_GET['b2w']:false; if ($b2w) { global $wpdb; $sql = "SELECT DISTINCT meta_value FROM {$wpdb->postmeta} where meta_key = 'blogger_blog'"; $results = $wpdb->get_results($sql); foreach ($results as $result){ $result->meta_value = substr($result->meta_value, 0, strrpos($result->meta_value,'.')); if (strstr($b2w, $result->meta_value) !== false) { $b2w_temp = explode($result->meta_value, $b2w); $b2w = substr($b2w_temp[1], strpos($b2w_temp[1], '/')); if(strpos($b2w,'?') > 0){ $b2w = strstr($b2w,'?',true); } } $sqlstr = $wpdb->prepare("SELECT wposts.ID, 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 = %s", $b2w); $wpurl = $wpdb->get_results($sqlstr, ARRAY_N); if ($wpurl){ header( 'Location: '.get_permalink($wpurl[0][0]).' ') ; die(); } else { header("Status: 301 Moved Permanently"); header("Location:".home_url()); } } } } add_action('init','rt_Blogger_To_Wordpress_Redirection'); /* Verify Configuration */ function rt_b2wr_verify_config() { global $wpdb; $domain_name = $_POST['dname']; $sql = $wpdb->prepare("SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = 'blogger_blog' AND meta_value = %s ORDER BY rand() LIMIT 1",$domain_name); $rand_col = $wpdb->get_results($sql); $rand_post_id = $rand_col[0]->post_id; $sql1 = $wpdb->prepare("SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = 'blogger_permalink' ORDER BY rand() LIMIT 1",$rand_post_id); $rand_col2 = $wpdb->get_results($sql1); $blogger_url = 'http://'.$domain_name.$rand_col2[0]->meta_value; $blogger_link = ''.$blogger_url.' '; $local_url = get_permalink($rand_post_id); $local_link = ''.$local_url.' '; echo '

Test Case

Clicking this link » '.$blogger_link.'
Should redirect to » '.$local_link.'
'; die('

If you are stuck, you can use our free support forum or hire us.

'); } add_action('wp_ajax_rt_b2wr_verify_config', 'rt_b2wr_verify_config'); /* Get Latest Feeds - Begin */ function rt_Get_Feeds_From_Blogger2WP() { include_once(ABSPATH . WPINC . '/feed.php'); $rss = fetch_feed('http://rtcamp.com/tag/blogger-to-wordpress/feed'); if (!is_wp_error($rss)) { $maxitems = $rss->get_item_quantity(5); $rss_items = $rss->get_items(0, $maxitems); } ?>

Due to recent updates on blogger.com, Blogger to WordPress Redirection plugin has been rewritten. The process has also changed completely. Please refer the updated instructions here: (Read More…)

'; } } //add_action('admin_notices', 'rt_Blogger_to_Wordpress_Update_Notice', 5); function rt_b2wr_hide_notice_block() { update_option('rtb2wr206', 'done'); } add_action('wp_ajax_rt_b2wr_hide_notice_block', 'rt_b2wr_hide_notice_block'); ?>