Skip to:

Re: WPMU Integrated Installation

Beau Lebens


Actually I’m not using any plugins for the integration process, as bbPress and MU seem to handle it reasonably well “out of the box”.

I’m running r1197 of WPMU and of bbPress.

Here’s some of the things that are modified/running though:

config changes in bbPress:

$bb->wp_table_prefix = 'wp_';
$bb->wp_home = '';
$bb->wp_siteurl = '';

// Integrating with mu
$bb->cookiepath = '/';
$bb->cookiedomain = ''; // leading . allows subdomain sharing
$bb->usercookie = 'wordpressuser'; // WPMU doesn't hash cookies
$bb->passcookie = 'wordpresspass'; // WPMU doesn't hash cookies

// Load WordPress so we can use the same templates.
define('WP_BB', 'true');
require_once dirname(dirname(__FILE__)) . '/wp-blog-header.php';

config changes for WPMU

// Adding custom settings to force cookies to be shared with/accessible to bbPress
define('USER_COOKIE', 'wordpressuser');
define('PASS_COOKIE', 'wordpresspass');
define('COOKIEPATH', $base);
define('SITECOOKIEPATH', '/');
define('COOKIE_DOMAIN', ''); // same as bbPress

Plugins in bbPress

– A custom one I call “NoLogin” that just attempts to remove all reference that’s built into bbPress (and block actual attempts) at logging in via bbPress (rather than via MU)

– MD5 insecurity for bbPress by Sam Bauers

– A quick fix called “MainDomain” that redirects requests to a subdomain instance of the forums to the canonical version which is hosted from (rather than

– A quick and dirty “FixKSES” which allows the left/center/justify/right paragraph buttons to work in TinyMCE, because I’m using that for post formatting.

– Display Names by Michael Adams et al to show the MU display_name, rather than the bbPress username

WPMU plugins/hacks

Because I load the WP engine in addition to the bbPress engine (not very performance-friendly, but makes life easier for sharing code etc), I have access to a lot of the functionality I rely on in the rest of the site – grabbing friendly usernames, user icons/avatars, links to profiles (which are handled completely outside bbPress and WP functionality), etc etc.

I use the TinyMCE editor bundled with WP in bbPress for posting, which is surprisingly easy to add – just load the JS file and add a class to the TEXTAREA. The only thing I haven’t fixed just yet on this is that if you edit an existing post with multiple paragraphs in it then TinyMCE seems to squash it all back down to one.

I also found that I had to add a quick function to stripslashes() onto the hooks “pre_post” and “pre_topic_title” to prevent annoying slashes appearing in them.

One last thing that I discovered was that because the WP engine is being loaded to display bbPress pages, but it doesn’t really “know about” those pages (they’re not internal WP pages), it technically triggers a 404, even though it displays just find. I explained this a bit here: including a way around it.


I’m actually using the same templates for bbPress as I am for MU. I accomplish this by symlinking those files directly from the place they normally live, into my-templates/mbob/header.php and footer.php, then make custom files for all the internal bits.

HTH someone :)


Skip to toolbar