.: ShaolinTiger – Kung-Fu Geekery :.

Converting bBlog 0.76 to Wordpress 2.0 (Import/Export) Script

I had this hanging around for a while so I thought I may aswell publish it.

I tried quite a few import scripts to get my posts and comments from my old bBlog install over to my new Wordpress 2.0.1 installation, but none of them worked properly.

I found one in php which worked for Wordpress 1.5.2 and tweaked until it worked on 2.0.x series, it also imports some extra info like commentors IP addresses. (I suggest this one for 1.5.x)

It took me a long time to get it to update the comment count on Wordpress properly.

Imports categories properly, simplified it and I straightened up the workflow a bit.

bBlog Import

If you have a newer version of bBlog it should be pretty trivial to get it to work.

The original came from here:

Taj bBlog Wordpress Importer

So here you go, an easy to use and reliable bBlog to Wordpress import script!

You can download my bBlog to Wordpress 2.0 converter here.

[Post to Twitter]  [Post to Yahoo Buzz]  [Post to Delicious]  [Post to Ping.fm]  [Post to StumbleUpon] 

Tags: , , , , , , ,

Follow @ShaolinTiger on Twitter Follow me on Twitter Follow @ShaolinTiger on Twitter Subscribe to RSS Subscribe to RSS Subscribe to RSS

Posted in Internet & Tech | 18 comments -

Related Posts:
- So here we are, New Look for 2006! Happy New Year
- Welcome to ShaolinTiger.Com Version 3 – Web2.0 Style
- Cheque From Adbrite
- Search/Find and Replace Using phpMyAdmin and MySQL
- Happy Anniversary to ShaolinTiger.com!
- Google is going to be promoting Adsense/Adwords for Malaysia

18 Comments so far

  1. suanie  on July 4th, 2006 at 3:33 pm
    Using Mozilla Firefox Mozilla Firefox 1.5.0.4 on Windows Windows XP 

    oO bBlog.. blast from the past... and paul's current object of wrath

  2. Nicktay  on July 4th, 2006 at 4:18 pm
    Using Mozilla Firefox Mozilla Firefox 1.5.0.4 on Windows Windows XP 

    i didn't realized people still used bBlog :)

  3. ShaolinTiger  on July 4th, 2006 at 5:19 pm
    Using Mozilla Firefox Mozilla Firefox 1.5.0.4 on Windows Windows XP 

    suanie: Yah I still have some problems because of it.

    Nicktay: I guess they don't if they have any sense haha

  4. [PrankCall] » haha. im back again. :D  on November 14th, 2006 at 9:57 am
    Using WordPress WordPress 2.0.5 

    [...] anyway for the importing file, if anyone needs it, it is here. [...]

  5. Desmond Lee  on December 31st, 2006 at 9:22 pm
    Using Mozilla Firefox Mozilla Firefox 2.0 on Windows Windows XP 

    Hello,

    I tried your script and kept getting the error below (credentials changed and worked for bblog and WordPress):

    Warning: Invalid argument supplied for foreach() in ...\import-bblog.php on line 164
    couldn't get post ID

    [
    at import-bblog.php source line 164:

    foreach($post->sections as $section) {
    $categories[]=$section;
    }

    ]

    My old bblog 0.76 is at http://www.leedesmond.com/blog/ and am trying to migrate to WordPress 2.0.5 at above new site.

    Thanks ShaolinTiger for the help.

  6. Jim  on March 23rd, 2007 at 3:21 am
    Using Mozilla Firefox Mozilla Firefox 1.5.0.10 on Ubuntu Linux Ubuntu Linux 

    Thanks so much for this script. You saved me the time it would have taken to write it from scratch. I worked flawlessly to migrate from bblog 0.76 to Wordpress 2.1.2. Good on you.

    Jim

  7. Andrew Casad  on April 16th, 2007 at 1:19 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.3 on Mac OS Mac OS X 

    Thanks for the excellent script, however, I have two concerns. I have a running version of Wordpress 2.1.3 and bBlog 0.7.6. I have the PhotobBlog plugin installed, with the photobblog photos linked to my gallery. How should I edit the script to also import the associated photos (it uses the bBlog post number)? Also, when trying to use the script, I am not able to get to Step 1. The script stops loading, but the page has not changed; no error codes, etc. Any suggestions? Thanks!

  8. Mithfindel  on December 3rd, 2007 at 1:12 am
    Using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Windows Windows XP 

    Hi,

    I've been desperately trying to find a migration script from bBlog to WP2 and Google sent me right here. However, it seems that your file is not available anymore; is there anywhere on the Internet where I can download it ? I'd rather give it a try than try to figure it by myself with my newbie PHP/SQL skills.

    Thanks in advance !

  9. ShaolinTiger  on December 3rd, 2007 at 2:35 am
    Using Mozilla Firefox Mozilla Firefox 2.0.0.10 on Windows Windows XP 

    Mithfindel: I've uploaded the file again, it got lost in the recent crash. Do note it won't work if you try and convert to the latest 2.3 version of WP so do convert to an older version. Cheers!

  10. Dan Ashby  on January 29th, 2008 at 7:47 pm
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP 

    Hi Shaolin,

    Any news on the question from Andrew Casad? I'm where he is with the picture plugin and it appears to make the script break. Any help would be great...

    Dan

  11. ShaolinTiger  on January 29th, 2008 at 7:53 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Windows Windows XP 

    Do note this is for Wordpress 2.0.x only, not tested with 2.1.x or above.

    No idea about the picture plugin, you'll have to hack it yourselves.

  12. Dan Ashby  on January 29th, 2008 at 10:01 pm
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP 

    Thanks for the reply - interesting the 'Jim' said he had it working with 2.1.2, which I couldn't. I'll downgrade and let you know.

    Dan

  13. Jim  on January 29th, 2008 at 10:16 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Linux Linux 

    Dan Ashby, what failed for you? Perhaps you have some non-standard modifications to your bblog database structure. It's been ages since I migrated so I'm afraid I won't be much help, but you should post the problem your having specifically.

  14. Dan Ashby  on January 29th, 2008 at 10:23 pm
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP 

    The first problem is that $HTTP_GET_VARS is deprecated so I changed it to $GET which leaves me with:

    WordPress database error: [Field 'post_excerpt' doesn't have a default value]
    INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title,post_status, comment_status, ping_status, post_name) VALUES ('1', '-05-16 ', '-05-16 ', 'Jeez, I just couldn\'t be bothered, and it probably would have taken 5 years anyway, to make my own full feautured blog program. So I\'m using this one. It seems pretty easy to drive so there we go. If I can\'t import the old blog entries, I\'ll just put a link up to the old stuff - I guess that\'s easiest and I\'m tired with all this now anyhoo...', 'A new way to blog', 'publish', 'open', 'open', 'a-new-way-to-blog')

    couldn't get post ID

  15. ShaolinTiger  on January 30th, 2008 at 12:03 am
    Using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Windows Windows XP 

    Dan it looks like post_excerpt is a not null field, so you have to find out what order to add it in and then add a value for it, might be as much as just adding ' '

  16. Dan Ashby  on January 30th, 2008 at 12:06 am
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP 

    OK,

    I had to allow NULL entries in the following fields:

    wp_posts:
    post_excerpt
    to_ping
    pinged
    post_content_filtered

    wp_categories:
    category_description

    And also change the date formatting from %G to %Y:

    $post_date=strftime("%Y-%m-%d %T", $post->posttime);

    Hey BINGO! It works, thanks for a great script.

    Dan

  17. Alison  on November 1st, 2008 at 11:26 am
    Using Mozilla Firefox Mozilla Firefox 3.0.3 on Mac OS Mac OS X 

    Thanks so much for this. Good thing WP 2.0 is legacy supported and available for download, with the "Debian philosophy". I'll convert to WP 2.0 then upgrade.

    Any thoughts on converting over the theme?

  18. Jim  on November 1st, 2008 at 6:44 pm
    Using Mozilla Firefox Mozilla Firefox 3.0.3 on Ubuntu Linux Ubuntu Linux 

    I don't have any advice to offer regarding converting themes. I started over and expect you will too.

    I'm really surprised to learn that someone is still using bBlog. It's been years since it was supported. Wow!

Leave a reply