Tuesday 3 February 2015

Tweaking Tricks

Tweaking Tricks


How To Shift Your Blog From Blogger To Wordpress 2015

Posted: 02 Feb 2015 10:22 PM PST

How To Shift your Blog From Blogger to Wordpress

Your Blogger blog (abcde.blogspot.com) is hosted on Blogger platform and now you would like to shift the blog from Blogger to WordPress (self-hosted) with an domain name such as abcde.com. So, exactly What is the easiest way of shifting from Blogger to WordPress without losing any Google search traffic, page rank and your existing feed subscribers, and much more ?

WordPress Platform gives you a very easy single-click option for importing yout blog posts and comments from Blogger Blog to a brand new WordPress blog but there's more than just transferring the content and other data. For instance:
  • Some of your articles on the old blogspot online journal could be positioning high in web indexes for specific magic words yet once you move these articles to another Wordpress blog, you will lose the natural pursuit activity since the permalinks (or Urls) of your blog entries will change. 
  • Individuals go to your online journal through web indexes, program bookmarks and referrals from other sites that have connected to your site pages. In the event that you move to Wordpress, Blogger won't naturally divert these guests to your new site. 
  • When you change from Blogger to Wordpress, existing perusers who are subscribed to your Blogger RSS Feed may be lost everlastingly on the off chance that they don't physically subscribe to your new Wordpress RSS Feed (and generally won't).

The Importer tool available on the WordPress platform can only transfer content from Blogger to WordPress but if you want to cover all the issues which are mentioned above, follow this simple step-by-step tutorial. It just takes approximately 5 minutes to complete the shifting process and now you will also be able to transfer all the Google Traffic, Juice, each and every thing from your old blogspot.com address to your new WordPress Platform Blog.
How to Shift your Blog from Blogger to WordPress
Before starting the shifting process, you should take backup of your Blogger blog including all the data as well as XML template, blog posts and comments.
  • First of all Register a new web domain of your choice buy any Web hosting either from Godaddy,Bluehost etc, and Install WordPress on your new domain using that hosting.
  • Now, Open your WordPress blog's Admin Dashboard and under the Tools -> Click Import, there select and click the Blogger option. Now, you will need to Authorize WordPress to access your Blogger Account in order to import data. Select your blogspot.com blog and in a few minutes all your Blogger blog posts, all data, pics, links and comments will be transfered on your new WordPress Blog Site.
  • Just Click the WordPress Themes Editor in the Appearance -> Editor and then open the functions.php file for editing the content.  Just Copy  N Paste the following snippet/List of code inside your functions.php file (at the beginning of the file) and click the "Update File" option to save the changes.
  1. <?php
  2.  
  3. function tweaking_blogger_query_vars_filter( $vars ) {
  4. $vars[] = "blogger";
  5. return $vars;
  6. }
  7.  
  8. add_filter('query_vars', 'tweakingtricks_blogger_query_vars_filter');
  9.  
  10. function tweakingtricks_blogger_template_redirect() {
  11. global $wp_query;
  12. $blogger = $wp_query->query_vars['blogger'];
  13. if ( isset ( $blogger ) ) {
  14. wp_redirect( tweakingtricks_get_wordpress_url ( $blogger ) , 301 );
  15. exit;
  16. }
  17. }
  18.  
  19. add_action( 'template_redirect', 'tweakingtricks_blogger_template_redirect' );
  20.  
  21. function tweakingtricks_get_wordpress_url($blogger) {
  22. if ( preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts) ) {
  23. $query = new WP_Query (
  24. array ( "meta_key" => "blogger_permalink", "meta_value" => $url_parts[2] ) );
  25. if ($query->have_posts()) {
  26. $query->the_post();
  27. $url = get_permalink();
  28. }
  29. wp_reset_postdata();
  30. }
  31. return $url ? $url : home_url();
  32. }
  33.  
  34. ?>
  • Now, Open your Blogger Dashboard and click Templates Button. Now, choose the "Revert to Classic Templates" option in order to switch from the XML-based Blogger Template to Tag Based Templates.
  • Just, Copy N paste the following snippet/List into your Blogger template editor dont forget to replace all occurrences of tweakingtricks.in with your new WordPress site URL. If your WordPress site is located at example.com, replace tweakingtricks.in with example.com and paste the snippet in the Blogger template editor and after that Save the changes.
  1. <html>
  2. <head>
  3. <title><$BlogPageTitle$></title>
  4. <script>
  5. <MainOrArchivePage>
  6. window.location.href="http://tweakingtricks.in/"
  7. </MainOrArchivePage>
  8. <Blogger><ItemPage>
  9. window.location.href="http://tweakingtricks.in/?blogger=<$BlogItemPermalinkURL$>"
  10. </ItemPage></Blogger>
  11. </script>
  12. <MainPage>
  13. <link rel="canonical" href="http://tweakingtricks.in/" />
  14. </MainPage>
  15. <Blogger>
  16. <ItemPage>
  17. <link rel="canonical" href="http://tweakingtricks.in/?blogger=<$BlogItemPermalinkURL$>" />
  18. </ItemPage>
  19. </Blogger>
  20. </head>
  21. <body>
  22. <MainOrArchivePage>
  23. <h1><a href="http://tweakingtricks.in/"><$BlogTitle$></a></h1>
  24. </MainOrArchivePage>
  25. <Blogger>
  26. <ItemPage>
  27. <h1><a href="http://tweakingtricks.in/?blogger=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>
  28. <$BlogItemBody$>
  29. </ItemPage>
  30. </Blogger>
  31. </body>
  32. </html>
We are done. Now, to check just Open any page on your old Blogger blog and it should redirect you to the new WordPress blog. Here we used a permanent 301 redirect on the WordPress Blog and all the Google Traffic, Juice, PageRank will shift to your new WordPress Blog Pages.
The above listed method works for all the blogspot.com URLs and also all other countries domains such as blogspot.de ,blogspot.co.uk, blogspot.com.au or blogspot.in.
That's It...Enjoy!!

No comments:

Post a Comment

THANK YOU FOR COMMENT ON HTTP://TWEEKNTRICK.blogspot.com