Screenshot_2020 04 28 blogger Google Search

How to migrate your blog from bloggerspot to your Truehost Cpanel

1.Register a domain name and obtain Cpanel hosting for it

2.Login to your cpanel, under SOftaculous app installer and install wordpress

3.Login to your  blogger account to backup the content

4. Go to settings, select other option

5. Select Import & back up and click Back up content

6. Save backup on your computer

7.Login to your WordPress dashboard

8. Under Tools select Import

9. Run the blogger installer option

10. Choose file button to import the XML file downloaded from Blogger

11.Click Upload file and import button to complete uploading

12. Once upload is successful, select author and click submit

13. Go to settings and reset permalinks as below

14. Save changes

15. Return to blogger, themes and click revert to classic themes

16. Go to Edit Theme HTML , select displayed code and delete it

17. On WordPress, install plugin Blogger to WordPress Redirection

18. Click Start Configuration  on the heme to generate code

19. Copy code generated and paste it in your blogger under edit Theme Html

20. To redirect new WordPress, go to Appearance,editor, theme functions

21.

  • Copy and paste the following code on the bottom of the file:
    function blogger_query_vars_filter($vars) {
    $vars[] = "blogger";
    return $vars;
    }
    
    add_filter('query_vars', 'blogger_query_vars_filter');
    
    function blogger_template_redirect() {
    global $wp_query;
    $blogger = $wp_query - > query_vars['blogger'];
    if (isset($blogger)) {
    wp_redirect(get_wordpress_url($blogger), 301);
    exit;
    }
    
    }
    add_action('template_redirect', 'blogger_template_redirect');
    
    function get_wordpress_url($blogger) {
    if (preg_match('@^(?:https?://)?([^/]+)(.*)@i', $blogger, $url_parts)) {
    $query = new WP_Query(
    array("meta_key" = > "blogger_permalink", "meta_value" = > $url_parts[2]
    ) )
    ;
    if ($query - > have_posts()) {
    $query - > the_post();
    $url = get_permalink();
    }
    wp_reset_postdata();
    }
    return $url ? $url : home_url();
    }

    22,Click “Update file” button to save the bottom of the page23

 

23. Return to blogger to redirect RSS feeds

24. Click the button on the top-right corner to save changes

 

Leave A Comment

What’s happening in your mind about this post !

Your email address will not be published. Required fields are marked *

Make your site 10x faster with #LiteSpeed VPSGet it NOW at N2000 [30% Discount]
Cheapest Web hosting in Nigeria
× WhatsApp Us