BP_ENABLE_MULTIBLOG
This page is incomplete or needs checking and verifying or updating.
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.
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 );
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.
- Note that
BP_ENABLE_MULTIBLOG
is not the same thing as WordPress Multisite, andBP_ENABLE_MULTIBLOG
is not necessary for your users to have their own sites/blogs. BP_ENABLE_MULTIBLOG
does not enable separate BuddyPress networks on your installation. While it will be possible to view boonebgorges’s profile at more than one URL, the profile data itself (and group data, etc) will be the same on each site in your network. For multi-network BuddyPress, see https://wordpress.org/extend/plugins/bp-multi-network/.
Example use case
Enabling BuddyPress content to be displayable on any site in your network can be useful when supporting multilingual versions of your site.
If your setup has a separate site for each language, then setting BP_ENABLE_MULTIBLOG
to true allows you to access the BuddyPress pages in each language, e.g.:
http://mysite.com/members
http://french.mysite.com/members
http://spanish.mysite.com/members
http://german.mysite.com/members
Using a separate site for each language is one of the common approaches to multilingual web sites. In the WordPress specific world, it’s the approach that’s adopted by the Multilingual Press plugin https://wordpress.org/plugins/multilingual-press/.
[Note: a future challenge is how to handle multisite networks, where we want to allow some sites to support BuddyPress pages, but disable support on other sites in the network. As well as underlying implementation, ‘Super Admin’ controls to manage this would be useful.]