Install BP in a Sub-Blog
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?
define ( ‘BP_ROOT_BLOG’, 117 );
Will run on blog ID 117.
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.
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:
If I move some BP functions into the root blog, would the registration slug still be:
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.
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.
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?
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.
In the example above, is there anyway I can use:
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.
WOW – thanks r-a-y – you are great. Now I can switch it without bothering! Thanks alot!
This info should go in the codex, who’s up for it?
~ 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.
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 );
So that none puts
define ( ‘BP_ROOT_BLOG’, $blog_id );
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!!! “
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!
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
I guess I win the prize!
Added instructions to keep old user / group avatars:
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!
r-a-y~r-a-y once again, you is the man. The Instructions read like you’ve been doing software documentation for years.
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?
For those installing BP in a secondary blog, does the message autocomplete username feature work for you?
It doesn’t work for me. Just making sure if someone else can duplicate this issue.
duplicated and ticket reactivated…
any answer to my question?
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.
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?
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
thanks very much for your help.
- The topic ‘Install BP in a Sub-Blog’ is closed to new replies.