Skip to:
Codex HomeLegacy DocsArchived Section: Getting Started → Installing on a Secondary Blog

Installing on a Secondary Blog

Archived file. Good only up to BP 1.5 version

***The following pertains to administrators using WordPress 3.0 in network mode)***

This option might appeal to you if you want to style and theme BuddyPress differently than your root blog.

For example, say you have an existing WordPress setup located at hxxp://, but you really want to have BuddyPress located at hxxp:// (if you setup your network as a subdirectory install) or hxxp:// (if you setup your network as a subdomain install).

Interested? Read on!

(1) Configure the BP_ROOT_BLOG:

In order to run Buddypress on a secondary blog, you should create a second blog and modify BuddyPress’ internal settings to set your new blog as the BP root blog.

Next, define the ‘root’ blog you would like BuddyPress to reside at by adding the code snippet below to wp-config.php:
define ( 'BP_ROOT_BLOG', $blog_id );
define ( 'BP_ROOT_BLOG', 3 );

Note: In WordPress 3.1, your $blog_id can be found by navigating to the “Network Admin > Sites” page and hovering over the blog in question. You should see a link that resembles this:

Your $blog_id, in this instance, would be 1.

For WordPress 3.0, the $blog_id can be found in the “ID” column of the “Super Admin > Blogs” page.

(2) Activate the BuddyPress plugin and a BuddyPress-enabled theme

Now that you have defined the BP root blog, activate a BuddyPress-enabled theme on this blog such as the “BuddyPress Default” theme.

(3) Keep your old BuddyPress user / group avatars

Note: This does not apply to fresh BuddyPress installs!

When you move BuddyPress to a secondary blog, the upload path to your BuddyPress avatars will change. This means your avatars will be lost.

Don’t fret though! To have your old BuddyPress user and group avatars linked from their old location, add the following lines to your bp-custom.php file:


For example, say you previously installed Buddypress on your root blog (blog id #1) at hxxp://, you would fill in:

define( 'BP_AVATAR_UPLOAD_PATH', '/var/www/wp-content/blogs.dir/1/files' );
define( 'BP_AVATAR_URL', 'hxxp://' );

Note: This does not apply to fresh BuddyPress installs!

Now that you have BuddyPress setup under a secondary blog, you will want to redirect your old BuddyPress permalinks so they’ll successfully resolve to their new location.

*** The following example is for a BP install on a network subdirectory setup, if you’re using a network subdomain install, your .htaccess rules will be a variation on what is posted below ***

eg. Old BuddyPress location -> New BuddyPress location
hxxp:// -> hxxp://

hxxp:// -> hxxp://
hxxp:// -> hxxp://
hxxp:// -> hxxp://

To do this, navigate to where your wp-config.php file is located and in the same directory, there should be a .htaccess file.
Open this file in a text editor.

Above the line:
# add a trailing slash to /wp-admin

Add the following:
RedirectMatch 301 ^/members/(.*)$$1
RedirectMatch 301 ^/groups/(.*)$$1
RedirectMatch 301 ^/blogs/(.*)$$1
RedirectMatch 301 ^/forums/(.*)$$1

Now you can enjoy your BuddyPress install at its new location!

* Posted by r-a-y.

Skip to toolbar