Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP_ENABLE_MULTIBLOG

Codex HomeDeveloperDeveloper DocsUsing Multisite with BuddyPress → BP_ENABLE_MULTIBLOG

BP_ENABLE_MULTIBLOG is a BuddyPress constant that, when defined as true, allows your BuddyPress content to be displayed on any site in your WordPress Multisite network.

By default, BP_ENABLE_MULTIBLOG is disabled.

Description

On a normal BuddyPress installation (with BP_ENABLE_MULTIBLOG disabled), BuddyPress content – groups, profiles, etc – can only be viewed on the “root blog”. So, for example, your BuddyPress profile is, by default, located at a URL that looks like this:
http://example.com/members/boonebgorges/
and it is displayed using the BuddyPress theme powering your root blog at http://example.com/. This is true even if you allow users to create subdomain or subdirectory blogs, such as http://boone.example.com/ or http://example.com/boone/ – links to BuddyPress content, such as those that appear in your BuddyBar or WP toolbar, will always point back toward the root blog.

With BP_ENABLE_MULTIBLOG enabled, BuddyPress content will be displayable on any site in your network, and BP links will always point to the current site. Thus,

on http://boone.example.com/, profile links will point to http://boone.example.com/members/boonebgorges/
on http://example.com/boone/, profile links will point to http://example.com/boone/members/boonebgorges/
on http://example.com/, profile links will point to http://example.com/members/boonebgorges

and so forth.

↑ Top ↑

Usage

To turn on BP_ENABLE_MULTIBLOG mode, put the following line in your wp-config.php file, somewhere above “That’s all, stop editing!”:

define( 'BP_ENABLE_MULTIBLOG', true );

↑ Top ↑

Some warnings about BP_ENABLE_MULTIBLOG

BP_ENABLE_MULTIBLOG is not appropriate for most situations, and you should be sure to understand its limitations carefully before enabling it.