Re: importing bb_users into wp_users
I had the same epiphany as you did when I learned that bbpress existed.
Here’s what I did:
1. I looked at the currently registered users in WP (I only had a few) and noted their numeric ID numbers. I then went over to my phpbb database to see which users they would conflict with (i.e. which ones had the same unique numeric ID number).
2. I used a phpbb mod which allowed me to go into these users’ profiles and change their ID (not their name) to a number that would not conflict with the WP users, or any other user in the DB.
At this time, phpbb.com is having trouble with their mod downloads, so I just uploaded the mod file to my own server. You can view the complete mod here:
It takes about 10 minutes total to make all of the changes. Basically, what it does is add a field to the user’s profile when viewed by an administrator. In this field you can change their ID number to whatever you want it to be.
So, once the mod has been implemented, go through and change the ID number for whichever users conflict with your existing WP users.
3. Once you have gotten rid of all user ID conflicts, download Jaime GÓMEZ OBREGÓN’s incredible phpbb to bbpress importer, which can be found here:
You will need to edit the file so that it reflects your DB permissions for both the phpbb and the bbpress databases. Also, if you are running a WP integrated installation (as you obviously are), you will need to change the prefixes for a couple of tables further down in the code.
Change lines 172 and 173 from:
$bbpress_tables['users'] = DB_BBPRESS_TABLEPREFIX . 'users';
$bbpress_tables['usermeta'] = DB_BBPRESS_TABLEPREFIX . 'usermeta';
$bbpress_tables['users'] = 'wp_users';
$bbpress_tables['usermeta'] = 'wp_usermeta';
Note: be sure that you use the actual WP table prefix if it is something different than
wp_. This change will make the importer put the users into your existing
wp_ tables instead of in new
bb_ tables, which would defeat the whole point of your import.
Once you have modified the file, upload it and navigate your browser to it. It should run automatically, importing all of your phpbb info into your bbpress installation.
4. At this point my memory gets a little fuzzy. In either WP or BBP (or both?), the imported users did not have a role assigned to them. Make sure you check to see what role they are assigned and that it is what you want it to be.
Of course, before you do anything you should backup your existing WP database, and probably your phpbb database as well just in case. Then, scrap the bbpress tables that you have in the current (broken) installation so the importer has a blank canvas to work with.
You will also need to install the bbpress integration plugin in WP, which can be found here:
This plugin will assign the default WP new subscriber role to users who register through bbpress. However, on my blog/forum I changed things around a bit so registrations for both WP and BBP are handled through the WP registration screen. I don’t know why, but I’m just more comfortable with it that way.
I’m sure as time goes by more plugins from both sides will be developed which will allow for even tighter integration between WP and BBP.