Integrating bbpress
Integrating bbpress with WordpressMU is pretty straightforward and just like integrating it with regular wordpress.
We’ll assume you have a running version of WPMU installed. For our example, I’m using a subdomain install and the forum will be on a subdomain as well.
In cPanel, I went and added a subdomain. This creates folder on the system and adds the subdomain record for our forum, which I called (strangely enough ) forums. In MU, I went to Site Admin -> Options and added both forum and forums to the banned names list. Now, this in itself doesn’t do anything to get it working, but it will prevent someone creating a blog with the same name and pretending they are something official.
I also added a seperate database for the forums. Remember what you called it and what username/password you assigned to it.
Now, upload the bbpress files & folders to the forum folder that is now on the server. When you go to forums.yourwebsite.com, you should get bbpress telling you that there doesn’t seem to be a config file. Let’s make one and tell it to use the same database as MU is, so we can share users and logins.
Look for the file “config-sample.php” and open it up for editing. I like to do it live on the server because it’s the only excitement I get these days, but you may be more comfortable editing the file locally and then uploading it when you’re done.
Fill in your bbpress database details at the top. Should be pretty self-explanitory.
Under that, add the following details about your WMPU databse:
// This is the information about mu’s database. bbPress will look for users in this database
define(’USER_BBDB_NAME’, ‘wpmu_database’);
define(’USER_BBDB_USER’, ‘db_username’);
define(’USER_BBDB_PASSWORD’, ‘db_password’);
define(’USER_BBDB_HOST’, ‘localhost’);
define(’CUSTOM_USER_TABLE’, ‘wp_users’);
define(’CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);
This is so bbpress will use the users from MU. Cool, huh? To keep our cookies in the jar, add the following:
$bb->usercookie = ‘wordpressuser’;
$bb->passcookie = ‘wordpresspass’;
$bb->cookiedomain = ‘yourwebsite.com’; // or .example.com if there was a . above
$bb->cookiepath = ‘/’;
Fill in the rest of the details as best you can. When you get to the bottom, there’s a section about integrating Wordpress. In this case, what we need to do is set things to FALSE, so it reads thus:
$bb->wp_home = false;
$bb->wp_siteurl = false;
Save it as config.php and upload it. Now that you’ve done that, you can actually install bbpress. Go to forums.yourwebsite.com and click the link to run the installer. Make sure you fill in admin as the admin user because that’s what MU has the site admin set as. Add in the first forum like it says (I just said general) and click. It will now refresh and show all the tables it added. You’ll get a message about how the wp_users & wp_usermeta table already exists, but we knew that, right?
Click the link to go to your shiny new forum and, if you were already logged into your MU site, you’ll be logged in there too.
As always, if things aren’t clear or I missed a step or left something off, or even if you find one of my famous typos, feel free to mention it below. I wrote this up while actually adding a forum to an exisiting site, so it should work just dandy for you.
EDIT: If you’re having cookie issues between WPMU 1.5.1 and bbpress, please go read this thread.

March 27th, 2008 at 5:55 pm
This tutorial worked perfectly for me.
You may wish to mention that there are some header errors while setting up the first forum which (I think?) can be safely ignored.
A question: will this mean all new sign-ups will have automatic entry to both WPMU and BBPress? (i.e. I don’t need the plugin that offers to do this)
Thanks heaps for the great tutorial.
This tutorial worked perfectly for me.
You may wish to mention that there are some header errors while setting up the first forum which (I think?) can be safely ignored.
A question: will this mean all new sign-ups will have automatic entry to both WPMU and BBPress? (i.e. I don’t need the plugin that offers to do this)
Thanks heaps for the great tutorial.
March 27th, 2008 at 7:15 pm
Yep, when a user signs up in MU, bbpress will find them because it looks for users in MU’s user table.
If those headers errors went away after a refresh or other activity, yeah you should be okay to ignore it.
Yep, when a user signs up in MU, bbpress will find them because it looks for users in MU’s user table.
If those headers errors went away after a refresh or other activity, yeah you should be okay to ignore it.
March 30th, 2008 at 6:30 pm
Cool.. gonna try this.. Thanks Andrea
Cool.. gonna try this.. Thanks Andrea
March 31st, 2008 at 12:46 am
This is very useful, Andrea. I really like the WPMu planet idea you were talking about, let’s find a way to do it. Posts like this should be made more widely available to a community that can benefit, though this is always google
This is very useful, Andrea. I really like the WPMu planet idea you were talking about, let’s find a way to do it. Posts like this should be made more widely available to a community that can benefit, though this is always google
March 31st, 2008 at 7:34 pm
[...] WPMU Tutorials » Integrating bbpress wpmu es bbpress osszekapcsolasa (tags: wpmu bbpress) [...]
[...] WPMU Tutorials » Integrating bbpress wpmu es bbpress osszekapcsolasa (tags: wpmu bbpress) [...]
April 1st, 2008 at 3:36 pm
[...] 9 - WPMU Tutorials » Integrating bbpress [...]
[...] 9 - WPMU Tutorials » Integrating bbpress [...]
April 2nd, 2008 at 3:06 pm
Andrea, here we go again with the non-tech head trying to figure out something way beyond his abilities… Incidentally, this is what caused my crash earlier this week… I installed to the wrong directory…
ANYWAY…
I’ve got mu set to run with subdomains, not folders…
I followed the instructions… added the list of blocked subdomains. Created a subdomain (which created the forums folder). Created a DB. FTP’d the files to the forums folder.
when I go to the subdomain, instead of getting the “no config” error, I get bounced back to the main domain… There is no redirecting set on my subdomain.
When I added the config file, there was no difference…
I thought maybe I needed to unblock the subdomain to make it work, so I did that and wpmu was going to let me register forums… So that wasn’t it either… So I blocked it again…
It’s like the subdomain doesn’t exist or something… When I go to the folder… domain.com/forums/ it gives me the “no config file” message…
bbpress isn’t a must have for me, but I’d like it… and would like to get it to work now before I reload all the content that I blew up for everyone earlier this week in case I somehow manage to do it again…Thankfully I managed to recover that even though I had to redo the rest of the mu install…
Any idea why this might be happening? And… Is there harm in running the install from the folder instead of the subdomain?
Andrea, here we go again with the non-tech head trying to figure out something way beyond his abilities… Incidentally, this is what caused my crash earlier this week… I installed to the wrong directory…
ANYWAY…
I’ve got mu set to run with subdomains, not folders…
I followed the instructions… added the list of blocked subdomains. Created a subdomain (which created the forums folder). Created a DB. FTP’d the files to the forums folder.
when I go to the subdomain, instead of getting the “no config” error, I get bounced back to the main domain… There is no redirecting set on my subdomain.
When I added the config file, there was no difference…
I thought maybe I needed to unblock the subdomain to make it work, so I did that and wpmu was going to let me register forums… So that wasn’t it either… So I blocked it again…
It’s like the subdomain doesn’t exist or something… When I go to the folder… domain.com/forums/ it gives me the “no config file” message…
bbpress isn’t a must have for me, but I’d like it… and would like to get it to work now before I reload all the content that I blew up for everyone earlier this week in case I somehow manage to do it again…Thankfully I managed to recover that even though I had to redo the rest of the mu install…
Any idea why this might be happening? And… Is there harm in running the install from the folder instead of the subdomain?
May 7th, 2008 at 7:44 pm
Hey,
Different server setups will require different solutions so please do not shoot the messenger…
If you have WPMU set up to auto add blogs as subdomains, it will take over all subdomains via the .htaccess rules defined in the root of your site.
I added the following in the .htaccess of my root to lock WPMU out of that (forum) subdirectory.
Good luck!
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} forum.benefact.org
RewriteCond %{REQUEST_URI} !forum/
RewriteRule ^(.*)$ forum/$1 [L]]
Hey,
Different server setups will require different solutions so please do not shoot the messenger…
If you have WPMU set up to auto add blogs as subdomains, it will take over all subdomains via the .htaccess rules defined in the root of your site.
I added the following in the .htaccess of my root to lock WPMU out of that (forum) subdirectory.
Good luck!
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} forum.benefact.org
RewriteCond %{REQUEST_URI} !forum/
RewriteRule ^(.*)$ forum/$1 [L]]
May 7th, 2008 at 7:56 pm
er, I should add that the order of these rules is important.
All the fine tuning in the .htacess and/or httpd.conf (if applicable) needs to occure before the final wildcard domain rule (before the something *.yourdomain.com bit)
er, I should add that the order of these rules is important.
All the fine tuning in the .htacess and/or httpd.conf (if applicable) needs to occure before the final wildcard domain rule (before the something *.yourdomain.com bit)
May 20th, 2008 at 8:29 pm
I cant get this to work with Wpmu 1.5.1 and bbpress 0.9.0.2
I used to have 1.3.3 and 0.8.9 and it worked flawlessly, but now I upgraded and I just cant make it work no matter what I do. Any suggestions?
I cant get this to work with Wpmu 1.5.1 and bbpress 0.9.0.2
I used to have 1.3.3 and 0.8.9 and it worked flawlessly, but now I upgraded and I just cant make it work no matter what I do. Any suggestions?