在 WordPress 多站点中安装

在 WordPress 多站点中安装

Codex Home → Getting Started → Installation in WordPress Multisite
Installation in WordPress Multisite

Before installing BuddyPress, please make sure that you’ve checked the minimum server requirements and WordPress version compatibility.
You can install BuddyPress in your Network (multisite) in either of the following setups.
Network-wide
A. BuddyPress root blog in Main Site
B. BuddyPress root blog in Secondary Site
One site of the Network
C. BuddyPress Activated in Main Site only
D. BuddyPress Activated in Secondary Site only
Posts, comments, or activities of the users in sites other than where you activated BuddyPress won’t be recorded in the Activity Streams when you install BuddyPress in only one site of the network.
Special Setups
E. BP_ENABLE_MULTIBLOG – network activated
F. BuddyPress Multisite – network activated
A. Network-wide Activation – BuddyPress root blog in Main Site

Go to Dashboard → Network Admin.
Add BuddyPress through Plugins → Add New.
Activate BuddyPress.
Configure BuddyPress for Multisite.

B. Network-wide Activation – BuddyPress root blog in Secondary Site

Go to Dashboard → Network Admin.
Click on Sites link.
Find the ID number of the site you want to be the root site of your BuddyPress installation.
Open up your installation’s wp-config.php file.
Add
define ( ‘BP_ROOT_BLOG’, $blog_id );
to your wp-config.php file where $blog_id is the ID number of your chosen site and save the file.
Go to Dashboard → Network Admin.
Add BuddyPress through Plugins → Add New.
Activate BuddyPress. You will be redirected to the BuddyPress Welcome screen.
Configure BuddyPress for Multisite.

C. Activate BuddyPress in the Main Site of the Network only

Go to Dashboard → Network Admin.
Add BuddyPress through Plugins → Add New.
Proceed to the Dashboard of the Main Site.
Navigate to Plugins → Plugins .
Activate BuddyPress. You will be redirected to the BuddyPress Welcome screen.
Configure BuddyPress.

D. Activate BuddyPress in only one of the Secondary Sites of the Network

Go to Dashboard → Network Admin.
Click on Sites link.
Find the ID number of the site you want to be the root site of your BuddyPress installation.
Open up your installation’s wp-config.php file.
Add
define ( ‘BP_ROOT_BLOG’, $blog_id );
to your wp-config.php file where $blog_id is the ID number of your chosen site and save the file.
Go to Dashboard → Network Admin.
Add BuddyPress through Plugins → Add New.
Navigate to the subsite which you identified in your wp-config.php file earlier
Activate BuddyPress. You will be redirected to the BuddyPress Welcome screen.
Configure BuddyPress.

F. BuddyPress MultiSite
This extends BuddyPress network instance from one site or subsite to multiple BuddyPress instances in a WordPress Multisite installation. This setup is complicated and would require BuddyPress/WordPress expertise plus server administration skills. You would need to install plugins to be able to configure this set up such as:
– BP Multi Network (WordPress plugin repository) or
– BuddyPress Multi Network (BuddyDev.com)
Please post in the respective forums if you would need assistance with either.

⇒ Next: Configure BuddyPress
or
⇒ Next: Configure BuddyPress for Network-wide set ups
⇐Previous: Getting Started