NicJ.net

b2evolution 0.9 to WordPress 2.7 Migration Script

For the previous 5 years, nicj.net ran on a blogging platform called b2evolution, one of the hundreds of CMS (content-management systems) available.  b2evolution was pretty revolutionary for its time, and worked good as a platform in 2003.  Over the years, the version I had been running (0.9) became rather old and out-dated.  There were probably a few unpatched security holes in the version I was running, but I was getting frustrated at paying the “upgrade cost” to keep my website up-to-date with the latest releases.  Each new release took time to upgrade and invariably caused problems that I would have to spend time debugging.  Lately, there was a big problem with comment spam, which can be annoying to keep on top of.  b2evolution doesn’t have a good solution to reduce comment spam, whereas several newer blogging platforms use Akismet to help fight it.

So over the last year, I’ve been looking for a new blogging platform.  WordPress is the successor I chose.  WordPress is similar to b2volution (both spawned from the same parent), but what impresses me the most about WordPress is how clean the interface feels and how powerful the blogging platform is with all of the community plug-ins available.  Upgrades are seamless as well (as simple as a subversion ‘update’ command).

The problem was what to do with all of the old posts on nicj.net in the b2evolution MySQL database.  Not that anyone cares what I wrote during my junior year of college, but I was hoping to at least be able to archive some of those old posts as ‘private’ so I could have a journal that I could look back to at a later date.  I was sure someone had done b2evolution to WordPress posts/comment/users migration before, and sure-enough, there are several scripts out there:

The problem is, each script has its caveats: migrating from a specific b2evolution version to a specific WordPress version, and each has their own incompatabilities with my situation.

I finally settled on one from tumahler.com, and modified it a bit to suit my own migration needs.  Changes are:

  1. Supports b2evolution 0.9 to WordPress 2.7 migration
  2. Script can read from one b2evolution MySQL DB and write to a different WordPress MySQL DB
  3. Migrates posts marked as b2evolution private to WordPress private
  4. Sets categories for posts
  5. Only posts and comments are migrated (not users, metadata or categories)

So I’m adding my script to the mix of publically available b2evolution -> WordPress migration scripts, in case it will help anyone:

https://github.com/nicjansma/migrate-b2evolution-to-wordpress (b2evo 0.9 to WP 2.7 tested)

Please note: Only use this on a clean WordPress install, as it will delete any WP posts, comments and metadata before the migration of b2evo data.

Share this: