Move From Blogger To WordPress and Maintain Permalinks And Traffic
While moving from blogger to WordPress is dead easy using the inbuilt blogger importer tool in WordPress, there is one dilemma/problem that a lot of people face, after importing from blogger, WordPress does not maintain the Permalinks(post slugs) i.e. the URL of the blog posts. I did a bit of hunting around and I found a solution it a really simple hack thanks to David Pascoe who provided the solution to this problem. I have tested this out and it works perfectly, you can move from blogger to WordPress and maintain your post URL or Permalinks (Post Slugs), hence maintaining your Google Search Traffic and Page rank without losing out on any Traffic. It took me less than 15 minutes to go through the whole process. (But It might take you longer if your new to WordPress)
Reasons to move from Blogger.
- Cutting edge and the very best blogging Software. Comparing Blogger and WordPress, WordPress beats Blogger hands down.
- Huge Community Which means Thousands of free cool Themes and Templates and Plugins.
- Easier blogging, better commenting system, spam fighting etc etc.
Draw Backs of Moving from Blogger to WordPress.
- Importing from Blogger to WordPress doesn’t import your blogger hosted pictures, they’ll still remain on Blogger, they’ll be visible for sometime but since Blogger doesn’t allow hot-linking you won’t seen them after sometime (Read about it here from the official Google FAQ), so you’ll need to move them maually to your webhost or to some photo hosting service. Luckily for most people this is not a big problem since most bloggers host their images on Flickr or Photobucket. For the more Geeky you can check out this Plugin or this shell command to move your pictures to your own domain.
I thought I would write a step-by-step tutorial since a lot of other people/bloggers will find this extremely useful. I am using kiruba.com as an example.
I am assuming a few things here.
- You know how to run and install WordPress. (Here are some Step-by-Step Guides to install WordPress on your Local computer Or To Install it on your Webhost Look at the Installation Section)
- You are using Blogger Beta (I guess by now everyone has been forced to migrate to the new blogger Beta by Google)
- You are hosted on your own domain like kiruba.com (for people trying to move from http://yourblog.blogspot.com I have posted extra steps you need to follow at the end)
How To move from Blogger To WordPress and Maintain your URL/Permalinks/post-slugs and Traffic
1. Install a Temporary WordPress Installation.
The first step is to Install a temporary WordPress installation either on your local Computer on in a temporary directory on your web host. The reason why we are installing WordPress on a temporary location is that, since we need to get all the posts from kiruba.com to WordPress then, delete the blogger installation, then Install a fresh WordPress Installation on kiruba.com and then put back all the Posts. We will use this temporary WordPress installation to import all your blog posts and comments and to test and see if all your blog posts and original Permalinks or URL’s are being maintained. After Installing WordPress Go To Manage Posts and Pages and Delete the dummy Hello world Post and the About us page these get created automatically when you first install WordPress. Learning how to install and enableing Permalinks is the only difficult part here, the rest is extremely easy.
Important Note: If you are installing WordPress on your local machine make sure you can use Permalinks. The step-by-step tutorial to install WordPress that I provided above shows you how to enable Permalinks it is given at the very last under the notes section.
2. Modify the Blogger Importer.
Don’t worry there is nothing much to do just download this file [download#4#nohits] and replace it with the original file located at wordpress/wp-admin/import/blogger.php
For the more technically inclined here are the changes that I made to the Blogger.php File thanks to David Pascoe
Open the file WordPress/wp-admin/import/blogger.php and look for the line containing the string wp_insert_post – at around line 520. Insert these 2 lines after the call to wp_insert_post; Note: The second and third line need to be in one single Line I had to break into two lines to fit it in.
preg_match("/([^/]+).html$/", $entry->old_permalink ,$matches); $wpdb->query("UPDATE $wpdb->posts SET post_name = '" . $matches . "' WHERE ID = '$post_id'");
3. Import All the Post and Comments From Blogger to WordPress Using the Importer.
Go to Mange > Import > Blogger
You’ll be presented with a option to Authorize the Importing process Click Authorize
You’ll be asked to Enter your Google User Name and Password.
After which you need to Click the Grant Access Button.
You’ll be shown a list of all the blogs you own on blogger and the number of posts and comments. Click the blog that you want to import.
Once you click the import button you’ll see a progress Bar as the comments and Posts get imported. Once its Done the Text in the Button gets changed to Set Authors Click this.
You will See your blogger username (if you have multiple authors you see them too) select Admin(This is the default WordPress user) from the drop down list and click save changes.
That’s it your done your done with importing your blog Posts. yay
4. Changing Your URL (Permalinks or Post slugs) to Maintain Your Google Juice and Page Rank
Ok here’s the part you’ve been waiting for its pretty easy go to Options > Permalinks
Change the selection from Default to Custom
Enter the Following text in the Custom Structure Textbox to
Note: If you’ve installed WordPress on your local system computer using Xampp like I mentioned above you’ll need to enable Permalinks. The step-by-step tutorial to install WordPress that I provided above shows you how to enable Permalinks under Xampp it is given at the very last under the notes section. After you’ve enabled it you’ll need enter
instead of the text I have provided above.
5. Checking Your URLs and Permalinks
Once your done just check your URLs to see if they are the same. The parts Highlighted in Bold are the ones you need to check
URL after Importing:
Move Everything To Fresh WordPress Installation
Once you are satisfied with everything, go to your temporary WordPress Installation Manage > Export Click the Download Export File. Download and save the XML file.
Delete your Blogger Installation and files Except your Image Directory i.e. if you have one.
Install a Fresh Copy Of WordPress in your Original Blog Location Example if your Blog was at kiruba.com then you need to install WordPress in the root if it was at kiruba/blog then you need to install WordPress in a directory called blog.
Import The XML file which you saved before Mange > Import > WordPress Browse and upload the file.
Select Admin from the Drop Down Box and press submit.
Repeat Step 4 to Switch on Permalinks that’s it your done do a Google search for any of your posts if your posts turns up that means you migrated to WordPress successfully while maintaining your Permalinks or URLs.
Extra Steps for Redirecting Your Traffic For Bloggers Moving From A BlogSpot Subdomain.
There are two ways to go about this. One is the quick and dirty way which is also a bit difficult the other is the long way which is the easiest.
The slow and easy way to move from a blogspot Subdomain.
I would recommend you to follow this rather than the quick and dirty way.
Here’s what you need to do.
- Buy your own domain.
- Use that Custom Domain Option. See this Step-by-Step Guide on configuring Custom Domains.
- Your original Blog*Spot address will automatically forward to your new domain. That way, any existing links or bookmarks and search traffic to your site will still work.
- Wait for 5-6 months for all search engines to update their data and links to your new site.
- Follow the Steps I have outlined above.
The Quick and Dirty way to move from a blogspot Subdomain.
I do not recommend this. Do this only if you are really eager and want to move quickly. See this guide here