BuddyPress and MultiSite

Hi there,

I have installed latest BuddyPress and trying to use it on a subsite (ie not the main site). First of all I activated it on the subsite and found there were permission problems when running the BuddyPress settings wizard. (“You do not have sufficient privileges to access this page”) Searching around revealed that it should be activated as a network activate and so I deactivated from subsite and network activated from main site.

I have set up the BP_ROOT_BLOG to be the correct subsite (both in wp-config.php and plugins/bp-custom.php as there are references to them both on http://codex.buddypress.org). Via the Sites control I have enabled the BuddyPress theme on my subsite. However all BuddyPress content still appears on my main site.

Any ideas what could be wrong? Does the BP_ROOT_BLOG setting have to be there before installing BuddyPress and activating, or should one be able to switch 'live'?

In the network admin BuddyPress settings for Pages (/wp-admin/network/admin.php?page=bp-page-settings) it is clearly showing my main site's pages, and not the subsite.

My speculation is that it something to do with the settings wizard as it asked about pages and I just left as defaults presuming that the define would sort things for me. I have since tried 1) reactivating plugin, 2) deleting plugin and reinstalling, 3) deleting plugin, deleting 'bp_' tables and installing... but nothing gets me back to that setting wizard. (And a reinstall does not seem to recreate the bp_ tables either!)

Any ideas? I am using latest WP, with latest Membership and Domain Mapping plugins.

And now I can't even get it working on the main site as when I try and activated the BuddyPress Default theme on it I get a "Cheatin’ uh?" message! (Though maybe that's good, and implies the define is doing something to stop it working on mainsite?)

Yours, thoroughly confused (and fed up!)
Andy

  • andy_paterson

    Well, I can at least re-rerun settings wizard now. It looks like if one doesn't remove all the bp- fields in wp_options, then it doesn't reinstall properly. It's now generated my tables too.

    So I can see in the 'Pages' section of the 'BuddyPress Setup' lots of settings which say...
    "Automatically create a page at: http://mainsite.com/index.php/members/" and give me the option to change to any page on my main site. There doesn't seem to be any way of making it specifying pages on subsite,mainsite.com or mappeddomain.com, despite the define being set for this subsite. (And I only have one subsite.)

  • Vaughan

    hi @andy_paterson

    I think you have to set the define in wp-config etc, before you activate BP.

    But you really should be able to activate it on a single site without network activation.

    you say mapped domain?

    have you also tried commenting out the following in wp-config.php

    // define('DOMAIN_CURRENT_SITE', 'xxxwebsites.com');
    // define('PATH_CURRENT_SITE', '/');
    // define('SITE_ID_CURRENT_SITE', 1);
    // define('BLOG_ID_CURRENT_SITE', 1);

    sometimes this works depending on the server environment, but sometimes you will need those lines. only try this if you are using domain-mapping.

    hope this helps. let us know if you require any further assistance.

    thanks

  • andy_paterson

    Hi there,

    Thanks for the help. I tried playing around with the domainmapping settings you mentioned, but that didn't seem to help.

    If I activate BP on just single subsite (the one which I've set as BP_ROOT_BLOG), then when I go to the subsite.com/wp-admin I can see the message "BuddyPress was successfully activated! Please run the installation wizard". But the link to the wizard takes me to mainstite.com/wp-admin/network/admin.php?page=bp-wizard and gives me the message "You do not have sufficient permissions to access this page."

    I think what I'll need to do is try starting from scratch on another domain that I was thinking about doing a multisite setup on. Then try this at various stages to see what goes wrong. There seems to be limited documentation on this particular use case.

    For the record, my wp-config settings are now...

    /* added to enable domain-mapping plugin */
    define('SUNRISE', 'on');

    /* added to set buddypress to not be network activated, but to work on individual blog */
    define( ‘BP_ROOT_BLOG’, 2);

    /* added to enable multisite */
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    //define('DOMAIN_CURRENT_SITE', 'mainsite.com');
    //define('PATH_CURRENT_SITE', '/');
    //define('SITE_ID_CURRENT_SITE', 1);
    //define('BLOG_ID_CURRENT_SITE', 1);

  • andy_paterson

    Okay, I'm up an running. I still can't activate on subsite (as I get the permissions message mentioned), and so have to do as network activate, but at least now in the setup wizard I can see the urls pointing to subsite pages.

    The problem was that the inverted commas that were in the define of BP_ROOT_BLOG were wrong. (You can see in my previous post that they are different to the other defines.) I picked up on this when starting from scratch on a different domain/install and following the manual...
    https://premium.wpmudev.org/manuals/wpmu-manual-2/creating-a-network-to-enable-wordpress-multisite/

    Found that BP 1.7 is now out and so I had multiple goes at installing that - multiple because I couldn't get the setup wizard link to appear and so kept deleting, clearing out bp- database stuff and reinstalling. Eventually I looked up the 1.7 changes only to find the setup wizard has been removed!

    So it seems I'm (finally) up an running!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.