Skip to:
Content
Pages
Categories
Search
Top
Bottom

Integration of established WP and BBPress installations

  • We have a 3+ year old WP install (2.7.1, 100s of posts) and a bbPress install (0.8.3, 1000s of users). Currently the integration is only skin deep. Separate databases, no user integration. We are thinking of taking the plunge and deepening the integration. I think I have read all the relevant threads here (some of them more than once), but given that some of the advice has dated and that the “reverse integration” option isn’t covered in a lot of depth, I need to ask a few questions.

    First, I saw chrishajer ask why one would integrate. In our case there are two reasons:

    1. So that forum member identity carries over to commentor identity on the blog

    2. Because we want to do some customization of the profile information and there are a lot of WP plugins that can get us started on this

    Second, the approach I have in mind:

    1. Upgrade BBPress to 1.0 (for simplicity sake let’s pretend it is out of Alpha)

    2. Export the “bb_user” and “bb_usermeta” tables from the BBPress database (using phpMyAdmin)

    3. Import these tables into the WP database and rename them to “wp_users” and “wp_usermeta”

    4. Recreate the WP users I lost in the process (only a few of these)

    5. Point BBPress to the WP database for the user tables in the BBPress admin settings page

    6. Take care of all the cookie settings stuff (won’t focus on this one for now)

    My questions for now:

    1. Does this sound reasonable, or am I missing something important?

    2. I know my steps oversimplify the process – where is it going to get tricky?

    3. Is there some benefit to integrating the databases completely, or is the user-only integration ok?

    4. How do I handle the fact that “wp_users” has an extra index on “user_nicename”?

    5. Will this complicate future upgrades of WP and BBPress?

    Thanks in advance for any advice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • This sounds reasonable but painful. :-)

    Some tips:

    * Only upgrade bbPress to 0.9

    * Upgrading to WordPress 2.7.1 almost made this impossible, but ck and superanne saved your bacon with plugins for WP 2.7 <=> bbPress 0.9 cookie compatibility. :-)

    * Don’t forget to assign your WP users privileges (e.g. Keymaster) by adding a row to the usermeta table

    * How are you going to handle user_id conflicts between bbPress and WordPress? For instance, if the WordPress “asdf” user/author has a user_id of 17, and there’s also a user on bbPress with a user_id of 17, you’ll have to do a bunch of UPDATE queries to wp_posts (post_author field) and wp_comments (comment_author and user_id), because when you create a new author with a user_id of 1000, it won’t match up with the post_author_field (etc.) which will have the old 17 number in it.

    * Also what about username conflicts, e.g. two users named “asdf”, etc.? That might result in more UPDATE queries… You’ll have to rename the WordPress user, probably.

    * The benefit to integrating the databases completely is you don’t have to make two connections to two databases. I’d go for it.

    * That extra index on user_nicename is the least of your problems. :-)

    * Are you sure that bb_users and wp_users has the exact same database schema? Confirm this! :-) Also, make sure to add any “missing indexes” that are currently in wp_users to “the new wp_users”.

    Good luck!

    Thanks bobbyh. This is very helpful.

    user_id and username conflicts should be managable since the number of WP users is very small.

    On schema, it looks like I need to add the user_activation_key field.

    > That extra index on user_nicename is the least of your problems. :-)

    So I would just add it using phpMyAdmin?

    Sure, that’s real easy. The hard part will be figuring out what UPDATE statements to write, and then writing and running them.

    You should probably take your sites offline while you run this maintenance…

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.