User Migration from phpBB to WordPress

Today’s topic involves migration, a process often boggled with frustration is caused by incompatibilities, missing data, linkages and whatnot. Our subjects for this migration are phpBB and WordPress, specifically the bbPress wordpress plugin if you want to keep your bulletin board (I only migrate users). With bbPress it is as simple as 3 steps.

Our Migration will be: phpBB 3.0.11 -> WordPress 3.4.2 (bbPress 2.1.2)

And before we begin, I would like to announce that we have good news and bad news regarding to this conversion. I’ll start off positive to keep us in the mood.

The Good News: Plugins

Despite how migration can be quite painful when we want to consider “mappings” or better phrased “what goes where”, thankfully for wordPress we have plugins and even better  we have plugins that do this migration!

I found two plugins that people had success with:

Both convert your phpBB to bbPress which you can get here. These all are all WordPress plugins so just download and activate the plugins and off you go… or not quite

Now you would think you’d just fill in your parameters and you’d be done, but here comes the bad news so don’t start yet.

Just a friendly reminder, before you begin anything as always backup your data/code/database.

Bad News: Compatibility

If you try to run some of these you’ll probably find they don’t run straight out of the box, since they haven’t been updated for a while. Some of this can be remedied.

ForumConverter (Skip this section if you want to follow how I use bbConverter)

This one will not even start because of the latest version of bbPress is not supported. You can attempt to override it by changing wp-content/plugins/forumconverter/PhpbbToBbpress.php

and adding a line ‘212’ as a compatible version as I have done below

that should allow you to start, but it’s as far as I cover for forumconverter.

bbConverter

1. Parameters

bbConverter works out of the box, but you have to make sure you fill out the right parameters for the source database. Here is an example to access my local backup DB  on MySQL:

Select Platform: phpBB

Database Server: localhost

Database Port: 3306

Database Name: bb

Table Prefix: phpbb_

Don’t Press Start Yet! If you do, you could be missing around 10% of your users

2. URL Length Incompatibility

There is an incompatibility that causes bbConverter to drop users. This is the conversion of the user website, which is a varchar(100) in WordPress but varchar(255) on phpBB. Run this script on your source database to chop off those overly long URLs, change “bb” to your phpBB database name:

SET SQL_SAFE_UPDATES=0;

UPDATE bb.phpbb_users
SET user_website = SUBSTRING(user_website,0,99)
WHERE LENGTH(user_website) > 100;

SET SQL_SAFE_UPDATES=1;

3. Migrating Only Users

You can take ignore users as a conversion option, but there is not option to take only users. To work around this, I’ve modified the code in wp-content/plugins/bbconverter/bbconverter.php

Look for the $bbconverter_step in the code. For steps 4 and up comment out the $is_done = $converter->[action]; lines and the respective else clauses as seen below. Also add in

bbconverter_is_running = false;

at the end to prevent the process from starting over again. An example seen below.

X. Remainders

 Now for my user migration I migrated all the users except a dozen or so out of 20000. This was due to the Cyrillic character set not being supported. You can find out what users didn’t make the migration with the following MySQL script. Replace “bb” with the source database and “wordpress” with the destination database.

SELECT a.user_email
FROM bb.phpbb_users as a
LEFT JOIN wordpress.wp_users as b ON b.user_email = a.user_email
where b.user_email is null

And that  concludes our 3 step conversion with bbConverter assuming you have everything setup.

To summarize:

  1. Setup Parameters
  2. Truncate incompatibly long user URLs
  3. Remove Forum Conversion
  4. Check which users didn’t migrate (Optional)

Please do not hesitate to email me at colin.chung@ideanotion.net,  if you have any questions or suggestions.

Tagged with: ,
Posted in Technical, WordPress

Leave a Reply