B2 to WordPress migration script updated
Connie, who runs a blog called Turtelina's Kingdom, got in touch to say that the script was throwing up errors for her. I was just happy someone else was still on b2 and wanted to use the migration script!
After a quick look at her database, I realized that I hadn't anticipated the use of table prefixes (as I didn't use them in my setup) and that there was a field I was expecting in the comments table that I had probably hacked onto my own installation as part of my custom comment spam antimeasures. In any case, these were quick fixes and I'm happy to report that the script worked for her and Connie's got the WordPress version of her site up and running. (And she's done an amazing job of migrating her templates over so quickly.)
Download Version 1.1 of the b2 to WordPress migration script (20kb).
Important note on b2evolution: Some people have been erroneously linking to the script as a b2evolution to WordPress migration script. I want to make it clear that this script is not for b2evolution but for the older b2 blog engine. Since b2evolution is based on b2, it is possible (but highly improbable) that the script will also work for b2evolution. If anyone has a b2evolution setup and would like to test this, I'd appreciate hearing about your experiences. If the two database setups are not hugely different, it should not be too difficult to port the script to work with b2evolution.
Release notes:
Version 1.1
- Supports custom table prefixes for b2 and WP databases
- I've removed a custom field from the comments table that will trip up regular b2 databases
Version 1.0
Initial release. Only tested on my own database. Do not use this version as it has known dependencies on my setup.
The B2 to WordPress migration script updated article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
Subscribe to my blog






Eric
Thanks! I’m in the process of updating my old b2 site to WordPress (v2.0.3). Your script worked PERFECTLY to migrate the data … now I can concentrate on the look before swaping it in for the b2 site!
Well Done!!
June 13th, 2006 at 7:52 pmScott Bechtel
I just used this and it worked like a dream.
THANK YOU!!!!!!!!!!!!!!
December 29th, 2006 at 2:24 am–Scott
aral
You’re very welcome, Scott
December 29th, 2006 at 1:01 pmkihluh
tried it and it produced errors. gonna try the oldfashioned 1.2 -> 1.5 -> 2.0 method.
January 17th, 2007 at 10:12 pmMichael
Hi, I’m trying to migrate now to WordPress; however, this script doesn’t work on the newest 2.3.n version. Would this work for 2.0.11???
Please let me know.
November 8th, 2007 at 7:24 amAral
Sorry Michael, I haven’t tested with the latest Wordpress — I believe that may have database changes that are incompatible with it.
November 8th, 2007 at 12:08 pmMichael
It seems that there’s no category table anymore. Any suggestion?
November 8th, 2007 at 5:01 pmAral
Hmm, weren’t categories replaced with tags? Perhaps renaming that in the script would work?
November 8th, 2007 at 5:10 pmMichael
Category table is renamed to “taxonomy” with more columns. What should I edit?
November 8th, 2007 at 7:56 pmMichael
I’m upgrading sequentially from WP 2.1.3 which seems to be working.
BTW, the “smartToSimpleQuote”‘ function has syntax errors.
Nevertheless, thanks for the script!
November 9th, 2007 at 2:59 amMichael
I’m upgrading sequentially from WP 2.1.3 which seems to be working.
BTW, the “smartToSimpleQuote”‘ function has syntax errors.
Nevertheless, thanks for the script!
November 9th, 2007 at 2:59 amben
thanks pal, the script spewed out a few errors injecting b2 straight into wp 2.1.3 but i can’t see anything wrong. this was a lot less painless than the old import-b2.php i’ve used before.
December 24th, 2007 at 2:04 am纹身
Thank you very much!!
January 21st, 2009 at 6:38 amAndrew B
Cheers, this still works perfectly. You’ve saved me a lot of time.
A few errors came up but it imported the important posts and comments.
Thanks
February 11th, 2009 at 2:43 pmAral
That’s great to hear, Andrew
February 11th, 2009 at 3:17 pm