How To Move An Old Blogger Blog To WordPress Blog?


        

How To Move An Old Blogger Blog To WordPress Blog?

Using people start their blog from blogger, but once their blog gets popular they want it to move to WordPress blog, because WordPress has more customization and themes’s etc features. In WordPress you can go for self hosted blog. moving form blogger to WordPress very easy.

How To Move An Old Blogger Blog To WordPress Blog without losing traffic?
  • First register a domain and buy Linux based hosting along with Mysql database for setup WordPress.
  • Now install WordPress in your hosting account, i will take few minutes for installation, now days it’s usually comes with your hosting plan from your Hosting Panel you can install.
  • Once you done with WordPress installation. now go to your blogger and logging in to your account which you want to move to WordPress.

 Also Check :How To Improve Up WordPress Website Load Time?

  • Inside your blogger account go to settings, under settings go to Other’s, Now Click on Export your blog it will give an .XML file.
Export your blog

Export your blog

  • Now Login your WordPress Admin Dashboard and go to tools and under tools -> import and select the blogger option, it will ask for Authorize WordPress to access your Blogger Account. Now your blogger successfully imported to WordPress.
Wordpress Admin Dashboard

WordPress Admin Dashboard

  • Now you have to make some changes in your WordPress functions.php file you don’t want to lose your traffic, means if some busy click on your blogger post it will redirect to your WordPress post.
  • Under Appearance go to Editor and form right side select the Functions.php file, in functions.php file , Copy the code given below
  1. <?php
  2. function labnol_blogger_query_vars_filter( $vars ) {
  3. $vars[] = “blogger”;
  4. return $vars;
  5. }
  6. add_filter(‘query_vars’, ‘labnol_blogger_query_vars_filter’);
  7. function labnol_blogger_template_redirect() {
  8. global $wp_query;
  9. $blogger = $wp_query->query_vars['blogger'];
  10. if ( isset ( $blogger ) ) {
  11. wp_redirect( labnol_get_wordpress_url ( $blogger ) , 301 );
  12. exit;
  13. }
  14. }
  15. add_action( ‘template_redirect’, ‘labnol_blogger_template_redirect’ );
  16. function labnol_get_wordpress_url($blogger_slug) {
  17. global $wpdb;
  18. if ( preg_match(‘@^(?:https?://)?([^/]+)(.*)@i’, $blogger_slug, $matches) ) {
  19. $q = “SELECT guid FROM $wpdb->posts LEFT JOIN $wpdb->postmeta
  20. ON ($wpdb->posts.ID = $wpdb->postmeta.post_id)
  21. WHERE $wpdb->postmeta.meta_key=’blogger_permalink’
  22. AND $wpdb->postmeta.meta_value=’$matches[2]‘”;
  23. $wp_url = $wpdb->get_var($q);
  24. }
  25. return $wp_url ? $wp_url : home_url();
  26. }
  27. ?>

Comments

comments