Update #3 (26 April 2007): This plugin has been broken by changes made to feeds on Blogger, and is pretty much unusable anymore. The download links are still there so if you want to try it anyway you can do so. Try to see the method described in TechCounter (the last one) for a good method. Theoretically this would work but I have not tried it. Good luck!.
Update #2: Only 500 posts can be imported via RSS (Blogger limited the RSS feed to only contain 500 max posts). Check out comment 181 and 191 below for suggestions.
Update: This plugin is now known as Blogger RSS Import instead of New Blogger Import.
Back in December, I created a stand alone script to import Blogger Beta to WordPress. I didn’t really expect that many will benefit from it until I received so many comments and bug reports. So here is the improved version, as a plugin. Many improvements were done especially at the database side where WordPress functions are utilized, and there’s no security issue anymore.
Installation
As with any other plugin, here are the steps needed to install this plugin:
- Upload the script to /wp-content/plugins folder.
- Activate it under Plugins
- Look for it under the Manage menu. You should see Blogger RSS Import
Options
- Blogger ID: the front part of your Blogger blog. For example, if it’s http://myblog.blogspot.com then you need to enter myblog in the text box.
- Default author: if your blog only have one author (i.e. you) and you have created a user before using this script, you can select the user here. All of your posts will be associated to this user.
- Match authors…: this is useful if you have not explicitly created your username, or for multi user blogs. With this checked, the plugin will associate the authors with their own post. Any author not found in the system will be created as a subscriber (you need to edit the user later). This option overrides option 2.
- Default category: this option generally is the same as option 2 where a single category will be linked to your post. I leave this here for historical purpose and you might never know user’s preferences.
- Match categories…: import labels from your Blogger posts. If you don’t have any labels for your posts, it is safe to leave this unchecked and all posts will be associated with the value selected in option 4.
- Number of posts per cycle: This is the number of posts that will be imported per cycle, if you choose to have staged import. I recommend this for most users.
- I want to import everything all at once: this is the default behavior of the script when it was first released, until some users are having trouble with big number of posts to be imported from their Blogger. This disables the staged import and overrides option 6.
- Haloscan friendly: this option will cause your posts to have comment fields (invisible) for this Haloscan importer to work.
- Do not import comments: speeds up your import if you have no comment or 100% of your comments come from Haloscan, for example.
- Maintain my permalink: Blogger has a different way of setting post permalinks, and luckily it’s included in the feeds. Even if this is imported, you will need to edit your permalik structure to /%year%/%monthnum%/%postname%.html to work. Stephen might want to share his tips on this as he uses it.
Requirements
- Either allow_url_fopen is set to On, or the CURL extension is installed on the server.
- Full feeds are enabled on your Blogger (see image below)
- An open mind 😉
Will not work if…
- Your site is not hosted on Blogger server (i.e. on your own domain). You’ll need to republish everything on Blogger.
- You use other feed than Blogger feed (i.e. FeedBurner)
Tested on…
- WordPress 2.0.5
- WordPress 2.0.7
- WordPress 2.1
Credits goes to…
- My wife for being here for me
- Charles Wesley for suggesting CURL
- Dawn for the staged import
- John Halton for asking for the Haloscan import
- Stephen Newton for asking for Permalinks
- Ricardo for providing a testblog, and testing lots of things
- Andrea Trasatti for trying to help with the author & category matching
- Sander van Dragt for WordPress MU compatibility
- John Bindel for reporting and noticing the spot for the comments dates bug
And many thanks for the donators. Although I can’t withdraw money from Paypal, at least I can pay certain services. I appreciate your support.
Download
I know you are getting bored reading to all of text up there, so here it is:
new-blogger-import-1.0-final.zip (md5sum: 30538edd35c9427363e37dc842e78e07)
new-blogger-import-1.0-bugfix-1.zip (md5sum: 62ec6348b314df8ddd0d8df057e01812)
blogger-rss-import-1.1.zip (md5sum: 5e5b938a288eeb6cc1eb0e4f83edbd7a)
blogger-rss-import-1.2.zip (md5sum: ce31c1b8abf779c6758f026c2fd3bbfe)
blogger-rss-import-1.2.1.zip (md5sum: a4f6912601f25bee3c5ba31d9cd89769)
This is for users having trouble with the zip file: blogger-rss-import.txt (save as .php and upload it)
For those who would like to see the code: blogger-rss-import.phps
Please report all bugs to ady at romantika dot name.
Problems Encountered By Users
- Error 502
Warning: fopen(http://xxxxxxx.blogspot.com
/feeds/xxxxxxxxx /comments/default) [ function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 502 Bad Gateway in /home/xxxxxxxxxxx/public_html/wp -content/plugins/new-blogger-import.php on line 143 This problem is usually caused by connection between the host (server) and Blogger being not stable. There’s nothing I can do about it, but you can try again. Many users succeed when trying again.
Extra
During testing, for your convenience do consider WordPress Suicide. You can use it now, compared to before as reported by David in this post. Don’t delete all tables, use these settings:
Update: Justin has announced an upgraded version to cater to WordPress 2.1. This is needed as a new table was introduced to WordPress 2.1
Images
Images are not imported to your WordPress blog, so if your images are hosted on Blogger, they will not be displayed to visitors because of the hotlink protection. Consider this plugin by Notion: Blogger Image Import.
Problems?
If you encounter any problems, you are welcome to email me or post a comment. Please take note however that I will need time to respond, and look at the problems. This code is in no way 100% free from bugs.
I recommend all questions include everything you know, up to the extent of the PHP version on the server, if you know. In any case please included these information as a minimum:
- Blogger URL
- Destination WP URL
It would be extra helpful to have a screenshot of the error message, or any particular area you are having problems with. Here’s a good software to capture screenshots called MwSnap.
In short, I need as much information as possible in order to give advice and help you troubleshoot the problem. I am no clairvoyant 🙂
Post changelog
- February 1, 2007 19:25 GMT+8
- Changed /%year%/%month%/%name%.html to /%year%/%monthnum%/%postname%.html (Thanks Stephen)
- February 23, 2007
- Added problems section
- Urgent Bugfix – permalinks with dash or underscore not captured. Any other characters used in blogger Id?
- February 26, 2007
- Upgraded to version 1.1 and changed name to Blogger RSS Import. I think the new name is more suitable, without the word “new” that confuses many people.
- A very important update to this version is the ability to extract more than 25 comments, where this problem was faced by John Doe (refer to comments). A revamp was done to the code to extract comments.
- Also added was the ability not to import comments, and skip cycles to minimize overlapping posts when re-importing.
- March 4, 2007
- Version 1.2 is released. Important bug fix – comments dates were incorrectly imported (only effects version 1.1). Thanks to John Bindel for reporting and noticing the problem in the code.
- March 5, 2007
- Version 1.2.1 is released due to some problems getting initial comments data (number of comments). I am sensing that Blogger is making changes. This plugin may be obsolete soon so if you want to use it, do it now.
- March 8, 2007
- I don’t know what I was thinking, with the phps version. Obviously it would not work as the web server will format the output to be pretty. I’ve provided a link to the text version.
Complete code changelog is available inside the plugin file itself.
I tried to re-import my blogger posts and found that the plugin got hung up when it reached a post that had no comments. I didn’t have too many comments so I manually changed them on my blog, but I thought you might want to know.
Ady: I’m considering a switch from Blogger.com to WordPress, but I cannot figure out whether your Blogger RSS Plug-In works (fully) with WordPress or Blogger.com. I have not even begun to explore WordPress until I figure out how to import articles (postings) from Blogger.com for my site Superchefblog.com — and I’m worried that your Plug-In expects standard new Blogger.com usage, specifically usage Blogspot.com which includes Layouts. The very reason I am ready to move to WordPress is because Blogger.com has wimped out of supporting FTP sites like mine… I would be grateful for your reply – Juliette
@David: Maybe the connection timed out? Did the server it give you any error message?
@Juliette: Depends on what you mean by fully. Please see the list of features above for what this plugin is able to do. The main purpose of this plugin is to import posts and comments from Blogger.com to WordPress, but some users did request for extra features and if it is possible I’ll try to make it happen! 🙂
@Gerente: Your comment went into SPAM. However I’ve provided a fix (version 1.2.1). I think David is having the same issue. This is due to a no longer working parameter when retrieving from Blogger. I sense that they are changing things.
Ady, my migratiion to wordpress from blogger has finished very good, problally yesterday the conection was damaged.
thanks a lot.
I use WordPress 2.1.2 and can’t import all posts from blogspot. I get some mysql error messages 🙁
🙁
@ju: after receiving your comment I immediately downloaded 2.1.2 on my development server and tried it out. It worked fine here. Can you provide a screenshot or give me the error message?
I’m doint it again at my localhost and it seems that it works fine.
Why it shows me that I have 500 posts when I have 1035?
And what can I do when current step failed? Refresh?
I think it will be good if I can choose start post number in case something goes wrong
I’m having the same problem. Looks like blogger may be getting wise to this. Looks like they are limiting this to 500?? I’m getting only the most recent 500 posts, the blog has 5159 posts on it…
@ju, @Chris: True. Another user emailed me last week with the same problem. Only 500 posts can be seen in the feeds, and the feeds sometimes are jumbled up and not arranged according to date! I have yet to find a solution to this limitation. If the feeds are indeed set to have a maximum of 500, all that can be done is import 500 recent posts, deleting them and importing again. This is indeed very dangerous and there’s no guarantee it’ll work. Maybe something was changed, as in the earlier life of this plugin, some users did have thousands of posts like you guys. Just curious if this is related to not upgraded template – have your blogs been upgraded to the new template in blogger? I have no idea yet how we can check this.
I think in this case, Blogger API implementation would be better than RSS feeds. WordPress 2.2 is in bleeding version in the SVN repository, and it includes an importer based on the Google API (http://wordpress.com/blog/2007/02/06/new-blogger-importer/).
I don’t think re-inventing the wheel is such a good idea, so maybe users with a large number of posts can wait for a while for 2.2 to be released.
Due to these limitations, this plugin has come very near to its end of life, as expected. Nevertheless I am quite pleased with the number of people it has helped, and I’ll continue with minor improvements (when I have the time) for whoever can utilize it now.
I see that… so I went to WP.com, created a blog (so that I could then export from there)… and Blogger is blocking access from THERE too!
They must be getting panicked about the exodus of people from Blogger.
Thanks anyway for your help.
Strangely enough, it does not work for me. I download the file in my “plugins” folder, but there is simply no script at all from the wordpress panel. It is like the file simply do not exist. I don’t understand why.
@Louis, download zip version and extract php file.
1-st time I tried directly with phps versions, link doesn’t work fine.
Do you rename phps to php?
@ju: thanks for helping.
@Louis: Yes, do not download the phps version. If you want you can use txt version: here
Rename, upload, and activate.
I was dumb to provide the .phps version – of course it wouldn’t work with all the html formatting in it, it’s no longer pure text!!!
Hey there,
This is a great tool, and it works wonderfully, except for one thing. It doesn’t export any of my comments…
Advice would be appreciated. I’m trying to go from natnit.blogspot.com to pandasmic.com.
@natnit: Are you sure you didn’t check the “Do not import comments” checkbox? I’ve tried importing your blog and it worked okay:
I have been trying to help a friend come over from blogger to wordpress. Tested the plugin with a test blog I created. It worked fine a few weeks ago. Been tying to bring his posts over today. I have encountered the limit of 500 posts if I use version 1.2 or 1.2.1. If I use 1.1 (which I used when testing a few weeks ago) I can import all 2160 posts. However, if I try to use version 1.1 I can not import comments. With version 1.2.1 I can import comments, though it often times out with blogger.
Suggestions Ady? Should I wait for version 2.2. of wordpress?