Integrating WPMu, BuddyPress, and bbPress

This is a tutorial documenting the steps I’ve been working through over the past week to integrate WPMu, BuddyPress, and bbPress. All of the applications versions I am currently using are either in beta, alpha, or taken from the trunk. So, needless to say, this tutorial will have to be updated regularly as the versions stabilize. Knowing this, I wrote this tutorial in a wiki, which I plan to update regularly as the version of each application changes. And once it’s all solid, I plan on moving it to any WordPress codex that will take it 🙂

Just about everything I document here comes from either the bbPress or BuddyPress forums. I just tried to organize the resources and instructions to help out anyone who is coming at this fresh, and needs pointers to the relevant resources such as forum threads, further tutorials, screencasts, etc. To see this insanely long tutorial, make the jump after the following link.

Integrating WPMu, BuddyPress, and bbPress tutorial

This entry was posted in wordpress multi-user, wpmu and tagged , , , , , , , . Bookmark the permalink.

57 Responses to Integrating WPMu, BuddyPress, and bbPress

  1. Joss Winn says:

    Thanks, Jim. I’m almost looking forward to getting back to work to try this out. When do you plan to put this into production use ? 🙂

  2. Pingback: WPMU Tutorials » WPMU + Buddypress + BBPress = hat trick of awesome

  3. Andrea_R says:

    Do you *ever* sleep? 😀

  4. Joe says:

    Wow, Rev. Just wow. I’m going to take the plunge on this very soon (probably during January) and I’ve been frightened. Thanks to you, I now have nothing to fear!

  5. Mikhail says:

    Very impressive, Jim. Thanks for blazing the trail. Looking forward to playing with this stuff.

  6. Matt says:

    Thanks, Jim — you rock. We’re going to be playing with this setup soon at CUNY.

  7. Reverend says:

    @Joss,
    Let me know if you have an issues along the way, I’m particularly interested in your setup since it is working off an LDAP. That would be a most useful addition to this tutorial 🙂

    @Andrea_r,
    Well aren’t you one to talk! I have never seen anyone so amazingly present and helpful on the WPMu forums as you are. And, I know from your tweets you do all this while taking care of the brood and cooking and stringing popcorn for the Xmas tree, etc. Who’s the one that doesn’t sleep 🙂

    @Joe,
    Let me know how it goes. Although, I wouldn;t push this on production server just yet. A few things need to be cleaned up in WPMu and BuddyPress. It will work, but it may be a bit buggy. Then again, the bava has not been bad at all, so who knows. But let em know if I can help when you make the jump.

    @Mikhail,
    Yeah, I think this suite of tools will make a nice addition to BaruchBlogs 🙂

    @Matt,
    “No, you rock and you know it” See, you will never be able to get that quote, ever. Until you have kids. And then you too will be quoting Pixar films. Jesus christ! 🙂

  8. Kate says:

    This is excellent, Jim!

    BuddyPress is really sweet. Thanks for putting this together!

  9. burtadsit says:

    Jim, the roles.php plugin you mentioned isn’t needed with all the latest beta or trunk versions of mu and bbpress. I’ve used one that does the same thing and it came from Michael Eagan. He saved quite a few of our asses back when it was needed.

    http://www.michaeleagan.com/plugins/wpmu-enable-bbpress-capabilities/

    That relieved some of the overwhelming sense of utter confusion that reigned at the keyboard and on the forums.

    The integration of mu and bbress was a complete black art until recently. The docs (what scant dribs you could collect) were misleading and just plain wrong.

    Ten people had ten different methods and conflicting advice. I took all the how-to posts, readme.txts printed them out and cut them into smaller pieces. Then I put them in a can. Shaking them violently and sobbing, tears running down my cheeks, I flung the can against the wall.

    On hands and knees I quietly arranged them into a pleasing pattern. How nice. I see how those two pieces fit. Look. This goes to that! Of course. Stupid. I did it the other way yesterday.

    Try it. Just try it. Just try it like THAT.

    Oh shit. OH SHIT. its working. It’s working. ITSWORKING!

    DONTTOUCHIT!DONTTOUCHANYTHING!OHSHITDONTDOANYTHING!

    backitup.backitup.backitup.backitup

  10. Reverend says:

    Burtadsit,

    I think you’re one of the reasons that the integration of bbPress and WPMu is no longer a black art. You’ve been a mensch on the forums, and I appreciate you clarifying the redundancy of the roles.php plugin, I thought I had read that—but I couldn’t find it again.

    See you on the forums 😉

  11. Mat_Jack1 says:

    thanks a lot!
    only one thing. I had problems with COOKIEHASH. The domain remained not set with the hash. The solution was putting the define command at the beginning of wp-config.php … i don’t know if there’s a better solution…

  12. Reverend says:

    Mat_Jack1,

    Interesting, what do you mean by putting the define command at the beginning of the wp-config, is that the first line of code you include in wp-config? Let me know, it will help me troubleshoot this installation which is anything but stable.

  13. Mat_Jack1 says:

    yes, i solved my problem putting the define command as the first command in wp-config.php.

    probably thats could be put in other positions but i haven’t tested more, if you need some detail i can test…

  14. Pingback: MediaWiki embed in WordPress | openedweb.com

  15. Trent says:

    I could have sworn I commented on this yesterday, but thanks for a great tutorial Jim!

  16. Reverend says:

    Trent,

    You did, but it was on my other site here: http://jimgroom.umwblogs.org

    And I replied there, and I will here too. Your work is what sealed the grail for me with forums and BuddyPress. So thank you, not only for the comments, but for all your hard work with this stuff and sharing it back (or paying it forward) on the forums.

  17. Thanks for providing this.

    If anyone is like me and is unable to stay online and watch the screen cast, the url for it is here:

    http://bbpress.videos.wordpress.com/VSHNDg1D/video/fmt_std

    Add on the *.avi extension to the resulting filename and it should play fine in winamp.

    Regards,
    -drmike

  18. Joss Winn says:

    I’m just looking at this now. Cookies are working at last. Thanks. Role mapping is still not working. New users on WPMU are not assigned a role in bbPress. Any ideas? De-activating the LDAP plugin doesn’t make any difference.

    Cheers!

  19. Joss Winn says:

    This plugin (link below) works as described, but as you didn’t mention it above, I didn’t think it was required.

    http://bbpress.org/plugins/topic/wpmu-enable-bbpress-capabilities/

    This gives me the functionality I was looking for. Are you using it? If not, how are you getting around it?

    Using the Sourceforge WPMU-LDAP plugin, shared login does not work from bbPress except for the Admin/KeyMaster user. I guess this is because only the Admin is a real WPMU user who does not query LDAP when logging in.

    Shared login does work from WPMU. Again, this is fine for my requirements as bbPress is the ‘child’ application of WPMU and it’s not unreasonable to expect users to be logged into WPMU in order to post to post to the support forum.

  20. Reverend says:

    Joss,

    Thanks for this, turns out I am using it but left it out of the tutorial, so your comment here is much appreciated. i will update the tutorial now, my bad.

    Interesting about the LDAP limitations, this is also good to know, because we are not using LDAP and I can;t really test that, so thanks–I’ll add this as a caveat.

  21. Hi, i’m happy and sad here. today i did a fresh instal of everything and it worked ok on the main blog.
    But when i create a second blog, the integration doesn’t work.
    don’t know what to do now…

    o yeah. i’m using the last wpmu trunk that came out (1620).

    By the way, thanks for the tutorial!

  22. HI again!!! i forgot saying that i’m donig just the first part of the integration between WPMU and BBpress! i’ll try buddypress later!
    but so far not very good.. TNX!

  23. AHA!! got it!
    i configured the bbpress integration plugin in inside a secondary blog and it told me that my Cookiedomain should be something like ‘.exemple.com’

    So it ends like this
    define(‘COOKIEHASH’,’3hb2gtrg2r24…’)
    define(‘COOKIE_DOMAIN’, ‘.exemple.com’);
    define(‘COOKIEPATH’, ‘/’);

    it worked nicely! now i’ll test it a little bit more! and later i’ll try he buddypress.

    TNX again. = )

  24. Erwin says:

    Hi,

    Thanks so much for these tutorials! Between the screencast and what you wrote, I got it (almost) working!

    The cookie thing still does not seem to be working. The users are created in bbpress just fine, and they can log in to the forum manually, but once logged into the blog, and you change the address to the /forums/ the login info doesn’t get carried over and you arrive at the forum not logged in.

    The only thing I could not complete in this tutorial is the cookie hash. No matter which of the several cookie settings I put in the wp-config file, it doesn’t allow me to log in to the WPMU blog anymore. Only if I comment the defaint COOKIEHASH line I can login again.

    I have several cookies lised in Firefox:

    wordpress_
    admin%7C12337…….ff7
    path:/forums/bb-admin

    wordpress_
    admin%7C12337…..ff7
    path:/forums/bb-plugins

    wordpress_
    admin%7C12337…..ff7
    path:/forums/my-plugins

    wordpress_
    admin%7C12337……ff7
    path:/wp-content/plugins

    wordpress_
    admin%7C12337……ff7
    path:/wp-admin

    wordpress_logged_in_
    admin%7C12337…….504
    path:/

    Which cookie do I need for the cookie hash? Also, do I need the “admin” or “admin%” before it as well?

  25. Joss Winn says:

    In my wp-config.php, this line works for me:

    define(‘COOKIEHASH’, ’75b85fdhdk73de5999f72fc03bc2hf6fgrj’ );

    (that’s not my hash, but you get the idea).

  26. Erwin says:

    Thanks, but what I am saying is, is that no matter what value I put in between those quotes (there are 3 different cookie values listed in Firefox for my domain) on the “define(‘COOKIEHASH’,”); line, the WP system doesn’t allow me to log in anymore.

  27. Reverend says:

    Erwin,

    Try clearing all your private data, cache, etc. from Firefox, and then restart the browser and go to your wpmu homepage (or the primary/first blog) and login, after that you should see only one cookie hash in the privacy settings in Firefox. Try that one, if it doesn’t work let me know.

  28. Erwin says:

    Reverend,

    I cleared all private data with the cookies, and logged in. The result is 8 cookies:

    5 times “wordpress_”
    1 wordpress_test_cookie
    1 wordpress_is_logged_in_
    1 PHPSESSID

    The 5 wordpress_ cookies list the following paths:
    /forums/bb-admin
    /forums/bb-plugins
    /forums/my-plugins
    /wp-admin
    /wp-content/plugins

    These all list “wordpress_” for name and “admin%7C…..1a3” for “content”.

    I tried the “7C…1a3” in the define line, still no luck.

    Erwin

  29. Reverend says:

    Erwin,

    I’m stumped, this is exactly what I have in my wp-config file underneath all the other secret code stuff:

    define(‘COOKIE_DOMAIN’, ”);
    define(‘COOKIEPATH’, ‘/’);

    define(‘COOKIEHASH’, ‘f5….8’);

    I don;t know why yours isn;t working, because you seem to be following the steps correctly. Are you using 1.0b2? I’m grasping at straws here….

  30. Erwin says:

    Reverend,

    Thanks for your help.

    Well, I ended up creating an md5 of my site URL (literally) and used that as my COOKIEHASH instead of what is listed in the cookies, and it works like a charm!

    I found the hint here:

    http://comox.textdrive.com/pipermail/wpmu-trac/2008-October/002136.html

    Which is a COOKIEHASH NOT FOUND error solution, but it works for me.

    Leaves the question: why is the hash listed in my cookies not correct?

    • Reverend says:

      Erwin,

      Glad to hear that, and a special thanks for sharing it back here in the comments. I’ll include it in the original tutorial should anyone run up against the same difficulties.

  31. Wardeh says:

    THANK YOU SO MUCH! Yes, I really mean that in all caps! I have been struggling and struggling with this integration and thanks to you, it is working!

    On the bbPress forums, someone mentioned this: http://bbpress.org/forums/topic/share-solution-for-bbpress-10-alpha-6-wordpress-mu-27-cookie-integration#post-23773. I tried that while trying your tips, and the integration would NOT work. So I undid that one little tip (from the forums) and then the magic happened. I just thought I’d include a mention of that topic, in case it would be tripping up someone else.

    Thanks again!

  32. Reverend says:

    Wardeh,

    Glad it worked for you, the setup can be a bear. And thanks for sharing back that tip, so if I have you right, don’t follow the tip from the forum post you linked, but stick with the bava plan? Is that right?

  33. Matt says:

    Has anyone had trouble getting their mu-plugins to work on the bbpress side??? I can’t get any of the buddypress core function calls to work on the forum side and for that matter any plugin in my mu-plugins folder is not being activated in bbpress, but everything else outside of that seems to be working just fine…

  34. pythagoras says:

    Hi, great article, thanks for the good work! I have still been unable to get this working, and have followed your steps closely (I think) I have a couple of questions:

    wpmu 2.7
    bbpress 0.9.0.4

    1) Cookie hash: when I include this I can no longer login to buddypress, with either my admin or a user I setup, but previously worked. When I remove the hash line, they work again…

    2) I do not have the following lines in my bb-config: (I just added them in)

    define( ‘BB_AUTH_KEY’, ‘unique-authentication key here’ );
    define( ‘BB_LOGGED_IN_KEY’, ‘unique-authentication key here’ );
    define( ‘BB_SECURE_AUTH_SALT’, ‘unique-authentication key here’ );
    define( ‘BB_NONCE_KEY’, ‘unique-authentication key here’ );
    define( ‘BB_AUTH_SALT’, ‘unique-authentication key here’ );
    define( ‘BB_LOGGED_IN_SALT’, ‘unique-authentication key here’ );
    define( ‘BB_SECURE_AUTH_KEY’, ‘unique-authentication key here’ );

    I only have: define(‘BB_SECRET_KEY’, ‘secret_key_here’); // Change this to a unique phrase.

    3) I do not see this in my bbpress settings page: Edit “settings” to enable xmlrpc and pingbacks (both)

    4) I do not see how to ‘add a user with admin rights’ in bbpress.
    None of my existing buddypress users are showing up.

    Integration and group forums do not seem to work, cannot login to bbpress with existing users other than keymaster (different password from buddypress)

    Any help would be much appreciated!

    Thanks!

  35. Reverend says:

    Pythagoras,

    I think the issue is that you need to use the alpha version of bbPress, as far as I understand the integration doesn’t work with the 0.9x versions. Double-check on the bbPress forums, but I believe this is the case, and it would explain for me all of your questions.

  36. pythagoras says:

    Thanks, I will try that!

  37. pythagoras says:

    Thanks! integration worked! Still don’t have group forums working, but I’m alot more optimistic now, thanks!

  38. pythagoras says:

    Got it! you rock whoever you are, I was banging my head against the wall!

  39. Thanks for this detailed walk through and the real world warning signs to look out for. Very much appreciated. 🙂

  40. yin says:

    After I post a topic in the group forum,I click the topic, but it give me “There are no posts for this topic”.
    any suggestion?

  41. Reverend says:

    Yin,

    I had that same issue until I updated to the latest bbPress (alpha 6) and the latest Buddy Press which is rc2. I recommended doing that and seeing if it works–if you already haven’t.

    Also, WPMu 2.7 final is out, are you using that version?

  42. Trace says:

    Like everyone else, I’ve struggled with this big time! The big catch – WPMU Cookies Hash…. The only hash my cookies hash are generated by BBpress cookies, MU cookies contain no hash…. so I’m not sure where everyone is getting their hash from to use in define(‘COOKIE_DOMAIN’, ”); …… simply using the hash generated by BBpress cookies does not work for me…. So my big question for everyone…. where are you getting your mu cookies hash from???

    I saw Erwins suggestion above where he links to: http://comox.textdrive.com/pipermail/wpmu-trac/2008-October/002136.html

    So I simply took wp-settings.php and changed:

    // Used to guarantee unique hash cookies
    if ( !isset($cookiehash) )
    $cookiehash = ”;

    and inserted my cookie hash….

    // Used to guarantee unique hash cookies
    if ( !isset($cookiehash) )
    $cookiehash = ‘xxxxxxxxxxxxxxxxxxxx’;

    Which sucks because I will have to update with every upgrade…. not really my goal… also, can’t log out of bbpress with this, but it works and after three days of struggling with this and a mu reinstall I will take what I can get….

    Is my solution a bad idea ? And where in the heck are you guys getting your mu cookies hash from ???????? 🙂

  43. Trace says:

    I ended up using hash from bbpress and moving the following to the very top of wp-config… as far as I can tell that is the only difference between what I was doing before with no success before… somehow I’m feeling like there’s more pain ahead. 🙂

    Moved to top of wp-config from bottom made the difference (i think):

    define(‘COOKIEHASH’, ‘xxxxxxxxxxxxxxxxxxxxxxx’);
    define(‘COOKIE_DOMAIN’, ”);
    define(‘COOKIEPATH’, ‘/forums/’);

  44. Reverend says:

    Trace,

    I wonder why you and Erwin can’t find your WPMu cookie hash. As for the switch from WPMu to bbPress cookies, this may work, but you’ll have to see if it translates cleanly from the wpmu user tables—as you can see, I am out of my depth here? 🙂

  45. Pingback: bbPress News, Tips, and Plugins « Lorelle on WordPress

  46. Reverend says:

    All,

    Here’s n additional trick, if for some reason the Cookie value in the browser doesn’t work. I found that you can take the cookies that show up in the Manual bbPress Config within the Settings–>WordPress Integration tab, specifically the value in the $bb->authcookie = (without the wordpress_) and give it a try. It might work, it did for me.

  47. Jan Ole Peek says:

    That cookiehash part of your tutorial solved that problem for me. Thanks so much for posting this!

  48. Pingback: Integrating WPMu, BuddyPress, and bbPress at bavatuesdays | Tom Altman’s Wedia Conversation

  49. Pingback: Son Of Byte » Blog Archive » Community

  50. Pingback: BuddyPress: A university’s social network – ../learninglab/joss

Leave a Reply to Reverend Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.