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.
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!!
I just used this and it worked like a dream.
THANK YOU!!!!!!!!!!!!!!
–Scott
You’re very welcome, Scott
tried it and it produced errors. gonna try the oldfashioned 1.2 -> 1.5 -> 2.0 method.
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.
Sorry Michael, I haven’t tested with the latest Wordpress — I believe that may have database changes that are incompatible with it.
It seems that there’s no category table anymore. Any suggestion?
Hmm, weren’t categories replaced with tags? Perhaps renaming that in the script would work?
Category table is renamed to “taxonomy” with more columns. What should I edit?
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!
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!
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.