Skip to:
Content
Pages
Categories
Search
Top
Bottom

Install BP in a Sub-Blog

  • @miguael

    Participant

    This is an issue for me since the beginning… Is it possible to run BP with everything attached to it (all the functions, overview, activity etc) in something else than the root-blog? Until now, i couldn’t figure it out how (I tries it in subdomain and subdirectories install…).

    I think native it’s not possible… but please teach me differently…

    Or: Does someone have a trick to do it?

    THANKS!

Viewing 21 replies - 1 through 21 (of 21 total)
  • @djpaul

    Keymaster

    https://codex.buddypress.org/how-to-guides/changing-internal-configuration-settings/

    define ( ‘BP_ROOT_BLOG’, 117 );

    Will run on blog ID 117.

    @johnjamesjacoby

    Keymaster

    In addition to what DJPaul said, BuddyPress no longer requires itself to be activated site wide. You can pick and choose which blogs BuddyPress is loaded on in each specific blogs’ plugins screen.

    @r-a-y

    Keymaster

    I’m thinking about doing this.

    Let’s say I have a root blog with a custom WP theme and I want to create a sub-blog with the slug “community”.

    So can I assume I can activate another theme, like the BP default theme, on sub-blog “community”, and that the URLs to profiles / groups / etc would be:

    – hxxp://example.com/community/members/profile/admin

    – hxxp://example.com/community/groups

    If I move some BP functions into the root blog, would the registration slug still be:

    – hxxp://example.com/register

    Or would it be hxxp://example.com/community/register ?

    I guess there’s only one way to find out! Going to test it right now.

    @johnjamesjacoby

    Keymaster

    If you have MU set as a subdirectory install, make a second blog called “community” and then set it as the BP root blog, everything would assume http://example.com/community/ is the root URL.

    @miguael

    Participant

    Thanks for all the good hints and advice.

    It’s working great! I even changed the slug-urls…

    One little pushback: All the old activity has the old links and is therefore pointing to nowhere… But I guess that’s not changeable?

    @r-a-y

    Keymaster

    @Michael

    You can change this with a little .htaccess magic.

    Say your Buddypress is setup in the following sub-blog – hxxp://example.com/community

    Find where your wp-config.php file is located and in the same directory there should be a .htaccess file. Open it up in a text editor.

    Above the line:

    # add a trailing slash to /wp-admin

    Add the following:

    RedirectMatch 301 ^/members/(.*)$ http://example.com/community/members/$1
    RedirectMatch 301 ^/groups/(.*)$ http://example.com/community/groups/$1
    RedirectMatch 301 ^/blogs/(.*)$ http://example.com/community/blogs/$1
    RedirectMatch 301 ^/forums/(.*)$ http://example.com/community/forums/$1

    This should correctly redirect your old BP links to the new ones.

    @JJJ

    In the example above, is there anyway I can use:

    hxxp://example.com/register

    Instead of:

    hxxp://example.com/community/register

    I don’t mind hacking a few core files to accomplish this. If not, I can always theme the registration / activate pages to match the WPMU root blog.

    I’ve only spent a few minutes looking into this so far and I haven’t found a way.

    @miguael

    Participant

    WOW – thanks r-a-y – you are great. Now I can switch it without bothering! Thanks alot!

    @apeatling

    Keymaster

    This info should go in the codex, who’s up for it?

    @windhamdavid

    Participant

    I’m up for it ~ https://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

    ~ although it’s my first codex edit (w00t).. so ya’ll may want to review it! *and note that the ‘home’ in the secondary nav is pointing to MEMBERS_SLUG in the codex.

    @miguael

    Participant

    Great! For all the dummys like I am it maybe would help to add this line somwhere as an example too:

    define ( ‘BP_ROOT_BLOG’, 117 );

    –>Blog Nr.117

    So that none puts

    define ( ‘BP_ROOT_BLOG’, $blog_id );

    in it :-)

    @windhamdavid

    Participant

    thks for the good advice – it’s edited. I can imagine the threads now “I follow these instructions and now my whole site is broke PLEASE HELP!!! “

    @r-a-y

    Keymaster

    I’ve edited the codex page for flow and structure – plus I added the second bullet point to the instructions.

    Feel free to make revisions!

    @r-a-y

    Keymaster

    Just figured out we also need to put up instructions to migrate user and group avatars.

    If I don’t get to it first, whomever puts up the instructions wins a prize!*

    *The prize is the neat satisfaction you get for helping the BP community ;)

    @r-a-y

    Keymaster

    I guess I win the prize! ;)

    Added instructions to keep old user / group avatars:

    https://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

    Michael (or someone else), let me know if these instructions work for you.

    I have a feeling the absolute path is going to throw some people off… feel free to edit the page!

    @windhamdavid

    Participant

    r-a-y~r-a-y once again, you is the man. The Instructions read like you’ve been doing software documentation for years.

    @miguael

    Participant

    It is very understandable (even for me :-)). But the question: Do I have to do this? Or when do preoblems occur, if I don’t do this. I moved my testinstall to a subblog (subdirectories) and didn’t experience any problems? Would it mess up with a subdomain install?

    @r-a-y

    Keymaster

    Hey gang,

    For those installing BP in a secondary blog, does the message autocomplete username feature work for you?

    https://trac.buddypress.org/ticket/1812

    It doesn’t work for me. Just making sure if someone else can duplicate this issue.

    @miguael

    Participant

    duplicated and ticket reactivated…

    any answer to my question? :-)

    @r-a-y

    Keymaster

    Hey Michael,

    Forgot about your question.

    If your old member / group avatars work without redefining the avatar URL and upload path, then that’s good for you :)

    I also can’t tell you what will happen with subdomains.

    The only thing I can say is try to break it! ;)

    Try uploading a new avatar with an old user and see what happens.

    @anointed

    Participant

    In addition to what DJPaul said, BuddyPress no longer requires itself to be activated site wide. You can pick and choose which blogs BuddyPress is loaded on in each specific blogs' plugins screen.

    When I activate bp on one site, it shows up in the plugins folder as activated site wide. I do not see an option of only activating it on a given blog.

    I am running wpmu2.9.1 and bp 1.2beta using subdomains install.

    I have also set bp root blog to all sites…. maybe that is the problem?

    @rockyteng

    Participant

    hi Windhamdavid,

    by saying [note that the ‘home’ in the secondary nav is pointing to MEMBERS_SLUG in the codex. ]

    could you explain a bit further

    i came with a problem and search on the forum a lot but could not find an answer.

    you can see the problem here

    https://buddypress.org/forums/topic/profile-links-broken-on-secondary-blog#post-38468

    thanks very much for your help.

    rocky

Viewing 21 replies - 1 through 21 (of 21 total)
  • The topic ‘Install BP in a Sub-Blog’ is closed to new replies.
Skip to toolbar