Multiple BuddyPress Social Networks

Multiple BuddyPress Social Networks

Since the merge of WordPress and WordPress MU, WordPress has supported running multiple WP networks in the same WP install. This site has been part of a multi-network install for more than two years. In WordPress, the networks are almost completely separated so we can create an infinite amount of blogs similar to Blogger, Tumblr, and other social media networks. The only thing that is shared between networks is the user information. Since BuddyPress is primarily focused on the users, when it is active in multiple networks in the same WP install, the BP social network is common across networks.

Over the last year plus, I've been collaborating with the BP core development team to add the ability to have multiple separate BuddyPress social networks in the same WordPress install. Over the last week, a number of changes have been rolled into BP trunk to support separate networks. However, by default, BP will continue to function as a single network across WP networks consistent with the current behavior. A plugin is required to enable multiple distinct BP networks.

Note: check out these BuddyPress examples to see what you can create.

You also need to have a plugin to create multiple WP networks in your install. For that, you can use either WP Multi Network or Networks+.

You can download an alpha version of my BP multi-network plugin below. This is currently only for testing and should be used on a test site. Once BP 1.3 is released I'll be adding this to the plugin repository at Instructions for using this are:

  • install the latest version of BuddyPress trunk You need at least revision #4392.
  • install bp-multi-network.php in the mu-plugins folder (must be installed there to work correctly)
  • create your second WP network with one of the plugins above
  • activate BP on the sub network and go through the installation wizard
  • for forums you need to tweak your bb-config.php a bit - see below

Download the plugin here.

bb-config.php changes

Your bb-config.php has a line similar to

$bb_table_prefix = 'wp_bb_';

Change that line to

if( function_exists( 'bp_core_get_table_prefix' ) )
	$bb_table_prefix = bp_core_get_table_prefix() . 'bb_';
	$bb_table_prefix = 'wp_bb_';

A few lines below that you'll see a line similar to

$bb->uri = "";

change that line to

if( function_exists( 'get_current_site' ) ) {
	$current_site = get_current_site();
	$bb->wordpress_mu_primary_blog_id = $current_site->blog_id;
	$bb->uri = BP_PLUGIN_URL . '/buddypress/bp-forums/bbpress/';
} else
	$bb->uri = "";
  • David Bisset
    Posted at 15:04h, 19 May Reply

    Ron – this is awesome. Think i pee’d a little when i read the title.

    Kidding aside, in theory if you have multiple BP networks, the next logical step would be to gather data/content from these networks on your main site/blog (similar to the demand of having blog posts from multisite networks on the homepage). Not to jump ahead too much, but I assume this might be a topic that will be explored down the eventual line? Any general thoughts or hints to get one started on investigating this.

    Otherwise I look forward to throwing this on my local dev in the next day or so.

    • Ron
      Posted at 15:55h, 19 May Reply

      You would have to do something similar to what Sitewide Tags does. I’d be inclined to wait until BP is migrated over to custom post types. CPTs would substantially reduce the amount of dev involved.

      • David Bisset
        Posted at 18:44h, 19 May Reply

        Good point. Do you happen to know where CPTs are on the BP roadmap?

        • Ron
          Posted at 18:59h, 19 May Reply

          I’m hoping 1.4 🙂

      • David
        Posted at 12:49h, 07 June Reply

        Yes, please develop the ability of mother-networks to show what’s happening in the child-networks!

        There are thousands of physical communities, like the towns of Lake County, Oregon, that would love to have their own child-networks under a mother-network. In our case, the mother-network would be Lake County and the child-networks would be each of our towns.

        I am currently researching the feasibility of creating community websites for our towns. I believe that the most successful format would be that of a social network. Assuming you could give us the technical support we would need to implement the network, we would love to be your guinea pig. Let me know!

        • Ron
          Posted at 14:40h, 07 June Reply

          “Yes, please develop the ability of mother-networks to show what’s happening in the child-networks!”

          That’s the way BP works out of the box. The point of this plugin is to segregate the BP content into separate networks.

          • David
            Posted at 17:50h, 09 June

            Cool. Got a link to an example I could check out? Thanks!

          • Ron
            Posted at 18:51h, 09 June

            “Got a link to an example I could check out?”

            No, I don’t know of any sites that are currently doing that.

  • Adam W. Warner
    Posted at 15:10h, 19 May Reply

    Wow…just wow.

  • William
    Posted at 18:09h, 22 May Reply

    Hi Ron,

    Will the user profile and activity being synced across the different BP sites under Multi BP Networks.

    Hope the new BP will be release soon.

    • Ron
      Posted at 20:01h, 22 May Reply

      That’s the way BP works now. The point of this plugin is to keep the activity and profiles separate between networks.

  • Frank
    Posted at 19:43h, 23 May Reply

    Awesome! Awesome!

    I currently run three different BP installations because I needed to create 3 different BP communities on the same domain. We didn’t want the activity, groups, and forums showing up in the other communities, but we wanted to share the same user db (It was way too wonky to get them running off of one user DB, and so I decided to play it safe and created three different installs.) Plus, we want our groups to eventually to be able to create their own blogs. Migrating will be a nightmare because a select few are members of two or all of the communities, but for plugin management, I think it would be worth it!

    • Dave
      Posted at 14:53h, 27 June Reply

      We pretty much need the same thing (I think)…

      We want to have the main network ( be the master db, where everyone is a member of SocialPlanet. But we also have sub-communities that want to have their own members and content.

      For example, a hierarchy might look similar to this: (members – 1,2,3,4,5)
      – (members 1,5)
      – (members 2,3)
      – (members 2,4,5)

      Maybe I’m on the wrong track here, but this would be perfect for us.

      We are currently trying to use the Groups feature under the SocialGo platform as our sub-networks (communities) but it’s just not working out for us.

      If anyone would like to see what I am talking about just visit

      We desperately need a solution for this. We have multiple non-profit organizations that are interested in becoming part of the Social Planet network, but they need their own space where they can focus on members that are interested in their mission.

      Any input or direction on how to move this forward would be GREATLY appreciated!

      • andrea
        Posted at 15:20h, 27 June Reply

        Have you tried the plugin in the post?

        • Dave
          Posted at 02:25h, 28 June Reply

          (blush) no. I haven’t tried the plugin yet.

          I am soooo new to WP. BUT, I am just starting to get my head around it.

          I have a multisite installation up and running with BP installed. But in truth, I am still trying to understand how it all works. Different themes, BP, etc.

          Anyway, I will try to install the plugin and see what happens.

          Also, I just want to say thanks in advance Andrea. I have seen your posts on various sites over the last few months that I’ve been reading about WP and I really value your input.

          • Dave Douglas
            Posted at 21:46h, 28 June

            Well, I guess this is beyond me.

            I installed the plugin, but for the life of me, I cannot find the “mu-plugins” folder that it is supposed to install to. It got installed to the “plugins” folder under the “wp-content” folder.

            Is it my old age that’s causing me to feel completely lost or does WP take a little getting used to? LOL

            Aaaaaaanyway, I installed it as the network admin thinking that was the best thing to do, but in truth, I’m completely lost.

            Maybe when things mature a bit and there is some documentation for idiots like me, I can figure this out, but for now I feel like a complete retard.

          • Ron
            Posted at 22:06h, 28 June

            You have to create the mu-plugins folder if it doesn’t exist. See It will not work properly if it’s installed in the plugins folder.

            Also, the plugin above is for BP 1.3 (currently in development) not BP 1.2.8. You have to download 1.3 either via SVN or tract (

          • Dave Douglas
            Posted at 16:21h, 30 June


            Apologies for being such a newbie with WP/BP and tackling cutting edge stuff like this. But I have been starting companies over the last 25 years in Silicon Valley haven’t kept up with the tech side of things over the last 10 years or so.

            That having been said, I have been able to take a couple of companies public and have a few start-ups go through acquisition. So the fact that I know exactly what I need in terms of product features, and there is nothing really out there yet to suffice, is pretty much par for the course. 😉

            Maybe we can use your professional services once we get a good track on which direction we are heading?

            Anyway, Thanks Ron!

  • Better metadata wrappers in BP 1.3 « BuddyPress Development Updates
    Posted at 15:20h, 24 June Reply

    […] options table of BP_ROOT_BLOG. But in non-standard setups – including BP_ENABLE_MULTIBLOG, or multinetwork BP – certain options may need to be stored somewhere other than BP_ROOT_BLOG. The bp_x_option() […]

  • Fée
    Posted at 05:53h, 29 June Reply

    Hello Andrea and Ron,

    I tried to install everything in the way you described, after setting up a running network, with BP 1.3-bleeding and the WP Multi Network Plugin. It seems not to work as excepted. The bp-multi-network.php does it’s update feature well, but the following point is not possible:
    – activate BP on the sub network and go through the installation wizard
    because BP is not available on the sub network, I can only activate it in network admin mode.
    Activated by this way it works as traditional BP. The group directory etc. not showing up, because these sites are missing, but in the BP admin bar navigation all directories are available – pointing on the main site (mother network).

    I’m not sure if I used the WP Multi Network options correctly, there is no documentation available. Tried to play with the clone options but I don’t come along well.

    Sure I’m thinking of buying your Network Plus plugin – if this will solve the problem! Do you think the WP Multi Network doesn’t do the job well, did you test it? Or am I expecting too much for now?

    By the way, when installing further more BP plugins now it gives me an error message that I first have to install BP. But BP surely is installed and active.

    Thanks for your development, it’s exactly what I’m looking for,

    • Ron
      Posted at 10:55h, 29 June Reply

      I’m the author of Networks+ and I used it to create the multi network install that I used to develop & test the BP multi-network plugin.

  • William
    Posted at 15:06h, 06 August Reply

    Hi Ron,

    tried use BP Multi-Network and it was working in the test site. But would like to know if it will work with BP 1.5 when released.

    Thank you,

    • Ron
      Posted at 15:11h, 06 August Reply

      BP version 1.3 (per the post above) was renumbered to BP 1.5. The above plugin was written for BP 1.5.

      If you are saying you tested it with BP 1.2.9 and it worked, your testing wasn’t very thorough as it does not work with 1.2.X. The BP filters it uses don’t exist in 1.2.X so it doesn’t do anything in 1.2.X.

      • william
        Posted at 21:53h, 07 August Reply

        Hi Ron,

        Thanks for the reply.

        I have WP 3.2.1 and BP 1.5 beta 1, and Networks+ plugin plus this BP Multi-Network plugin (these 2 plugins are in mu-plugins folder).

        The BP in the new network was not working as I will be directed to the main network’s BP site.

        I just removed everything from the test site and will wait for your instructions to start a brand new test.

        Hope it will work. Really like this plugin!

        • Ron
          Posted at 10:43h, 08 August Reply

          I won’t have a chance to look at this probably before the first of next month.

          However, at the time I was working on this the second network was not redirecting to the main one. If that redirection is a result of a change in BP, I won’t be fixing that in this plugin.

          Networks+ already has code in it for the second network to make the BP root blog the second network’s main site. See what happens on the second network when you remove the bp-multi-network plugin.

          • William
            Posted at 20:07h, 10 August

            Hi Ron,

            Thanks for the reply.

            I had done 2 more tests and here are some of the results.

            I setup 2 WP installs, first one (WP 3.2.1, BP 1.2.9, Networks+, BP Multi-Network)
            , and the second one is (WP 3.2.1, BP 1.5 beta 2, Networks+, BP Multi-Network)

            Both WP installs have BP activated on secondary blogs (2nd site of the Main Networks by adding “define( ‘BP_ROOT_BLOG’, 2 );” to the root wp-config.php ), and in Second Networks, BP are also activated.

            But both WP installs’ Second Networks BP still linked back to the Main Networks’ BP sites.

            So I added “define( ‘BP_ENABLE_MULTIBLOG’, true );” to both WP installs’ wp-config.php.

            And the result were that the Second Network’s BP site in (using BP 1.5 Beta2) is still linking back to Main Network’s BP site. And strangely, the Second Network’s BP site in (using BP 1.2.9) Worked! it became a totally separate BP network with its own groups, forums activity and so on.)

            I was not sure if BP Multi-Network did anything to‘s BP sites or it was mainly the line I added to wp-config.php ( “define( ‘BP_ENABLE_MULTIBLOG’, true );” )that did the trick as you mentioned BP Multi-Network will not work under BP 1.2.9.

            So above are my findings after several installs over the past days, and hope you would give me some instructions or maybe direct me to the right direction.

            Thank you very much,

          • Ron
            Posted at 21:00h, 10 August

            (2nd site of the Main Networks by adding “define( ‘BP_ROOT_BLOG’, 2 );” to the root wp-config.php )

            That’s your problem. You’ll have to write a mu-plugins plugin to define that value for each network. You’re forcing the second network to use blog 2 as the BP home site. Give the plugin a name like aaa-something.php.

      • Simon Taylor
        Posted at 06:30h, 08 September Reply


        Thanks for your work, this is really great stuff.

        I had got the impression from reading various forums and from talks at WordCamp that this functionality:

        “A multisite network of BuddyPress sites, each with their own users, feeds etc. ”

        is going to happen natively with the final release of BP 1.5

        Do you have any more information on this? If your plugin getting rolled into core or will it become obsolete?

        Thanks in advance,


        • Ron
          Posted at 11:19h, 08 September Reply

          is going to happen natively with the final release of BP 1.5

          That’s not true. You need the plugin above to have segregated networks.

          Also be aware that in WP (and BP) there is only one set of users across the entire install.

          • Simon Taylor
            Posted at 12:49h, 08 September

            I was mainly referring to this:


            At 14:10 James Jacoby answers a question asking about having a network of BP site – a kind of ‘BPMU’

            Am I missing something here or is this the same functionality that your plugin delivers?

            Thanks in advance,


          • Ron
            Posted at 13:08h, 08 September

            Per the post above

            However, by default, BP will continue to function as a single network across WP networks consistent with the current behavior. A plugin is required to enable multiple distinct BP networks.

  • William
    Posted at 22:01h, 10 August Reply

    Hi Ron

    I commented out the line “define( ‘BP_ROOT_BLOG’, 2 );” and everything is working as designed.

    As per your reply, now the only site in the Main Network that can use BP is the root site, right? So I need a plugin as you suggested to make that happen. As I am not a programmer so I guess I will have to wait for the plugin to be created by a developer.

    Thank you again for the reply and instructions.

    • andrea
      Posted at 09:32h, 15 September Reply

      The plugin is in the post above. That;s what the post is about and there’s a download link that I moved to a more prominent and obvious location.

  • Ron Cochran
    Posted at 05:11h, 18 September Reply

    I’m quite interested in your plugin but am having trouble getting it to work. I think I followed your instructions.

    I installed Networks+ on existing WordPress 3.2.1 installation and successfully set up two new network sites.
    I upgraded my existing BuddyPress to rev. 5153. (BP 1.5 rc1) It is network activated.
    I installed bp-multi-network.php to the mu-plugins folder.
    I didn’t make any changes to bb-config.php yet.

    I don’t see any way to activate BP on the sub-networks. There is no option in the Plugins tab and not anywhere else. If I click in Network Admin from the sub network it takes me back to the parent network (but only if I’ve deleted cookies).

    Can you give me ideas on what to check that I might have done wrong.


    • Ron
      Posted at 07:37h, 18 September Reply

      You can register at for help with Networks+. If you don’t have access to network admin in your second network then networks+ is not installed correctly.

      • Ron Cochran
        Posted at 11:19h, 18 September Reply

        Thanks for your quick reply.
        I’ll check with Networks+.

  • Amirtha
    Posted at 02:19h, 13 October Reply

    I had created the multi social networking sites using buddypress. Each site is having some users. same users can be in both the sites. When i am seeing the members directory for all the networking sites in the web page, shows a list of all the users in all the networking site and not displaying the users particular to a networking site.
    please help me.

    Thanks in advance.

    • Ron
      Posted at 09:57h, 13 October Reply

      From the first paragraph of the post above:

      In WordPress, the networks are almost completely separated. The only thing that is shared between networks is the user infomation.

  • sharq333
    Posted at 12:32h, 03 March Reply

    This all works fine but for one problem (that seems to be purely aesthetic but rather disruptive on the page). On the dashboard for the wordpress subnetwork with buddypress activated, and on the actual pages themselves, I get the following error:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/avatars/1) is not within the allowed path(s): (/f5/mysite/:/nfsn/apps/php53/lib/php/:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/) in /f5/mysite/public/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 195

    So again, this is displayed on the dashboard and on the pages (anywhere where there is an avatar).

    I can’t for the life of me figure out how to make this go away. The user avatars load fine, so I don’t know why there is an error anyway. I deactivated an uninstalled buddypress and re-installed/activated it again, but the problem persists.

    Any help would be greatly appreciated. Thanks very much.

    • Ron
      Posted at 12:42h, 03 March Reply

      Ask in the BuddyPress support forums. It’s an error with BuddyPress.

      • sharq333
        Posted at 13:20h, 03 March Reply

        Ok. Thanks.

  • joe
    Posted at 12:10h, 05 May Reply

    Thank you so much for this post. It helps me a lot in making my network’s buddypress to a have separated activities, etc.

    I like the way users are maintained, but their AVATARS where extremely gone!

    I tried uploading new avatar for myself and I’m surprised to see that it does actually accept the file/image.

    Now my problem is I dont want to have this kind of behaviour, I want all my user to have one avatar in all the networks I have. Please help :). Thank you so much!

    • Ron
      Posted at 13:10h, 05 May Reply

      You’ll have to hire a developer to look at that. Most people just use gravatars which will be consistent across the networks.

      • joe
        Posted at 13:28h, 05 May Reply

        Thank you so much for the reply.

        I figured it myself :).

        I created a custom plugin file and activated it in network admin with the following code:

        Tested and it works!

        Hope this will help people with the same situation as mine.

        Thanks again Ron!

        • joe
          Posted at 13:29h, 05 May Reply

          $dir = __DIR__ . '/../uploads';

          $uri = get_bloginfo('siteurl') .'/wp-content/uploads';

          define( 'BP_AVATAR_UPLOAD_PATH', $dir );

          define( 'BP_AVATAR_URL', $uri );

Post A Comment