WordPress 3.0 signals the merge of WordPress and WordPress MU, and allows you to manage a network of sites in WordPress. In this post, I’ll show you how to enable the Network screen and the MultiSite features in WordPress 3.0. You do not need to complete these steps if you are upgrading from WordPress MU. Follow the instructions here to upgrade from WordPress MU. You will need to perform these steps if you are upgrading from a standard pre-3.0 WordPress install and want to use the MultiSite features or on a new WordPress 3.0 install.
Enable Network Menu
Add the following line to wp-config.php:
define( 'WP_ALLOW_MULTISITE', true );
The Network menu under Tools will not show up until you complete this step.
Create a Network
Log in to the WordPress back-end and navigate to the Network screen under Tools. WordPress allows you to choose between sub-domain and sub-directory based installs for your network of sites. You can choose one or the other, but it’s not easy to change later, so you must decide before you proceed.
Sub-domains:
A sub-domain install allows you to have new sites as sub-domains of your WordPress installation. For example, you can have site1.domain.com and site2.domain.com for a WordPress installation at domain.com. You will need to add a wildcard domain alias for your webserver and a wildcard DNS record for your domain. Matt has a detailed explanation about wildcard DNS records and domain alias here.
Sub-directories:
A sub-directory install allows you to have new sites as sub-directories of your WordPress installation. For example, you can have domain.com/site1 and domain.com/site2 for a WordPress installation at domain.com.
Enable Network
Create Media Directory:
Create a blogs.dir directory under wp-content for all uploaded media files for all sites in the network. You must ensure that the new directory has the correct permissions so it is writable by the web-server (apache user).
Update wp-config.php:
Add the following lines to wp-config.php anywhere above /* That’s all, stop editing! Happy blogging. */
define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); //false for sub-directory install $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'domain.com' ); //replace domain.com with your install define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );
Update/Create .htaccess:
Create a file named .htaccess in the root WordPress directory and add the following:
Apache and sub-directory installs:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
Apache and sub-domain installs:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
Replace all WordPress related .htaccess rules with the ones above if the file already exists.
Rewrite Rules for Nginx and sub-directory installs:
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;
rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}
Return to the WordPress back-end. You will have to log-in again and now you’ll see a Super Admin menu item. You can manage your network of sites from this menu.



