How to install multi-site

This is meant as a very short form of the overly long Codex post.

Start with a clean regular single-site installation in the server document root.
Be an admin.
Make sure your salts are complete in your wp-config.php.
Give PHP at least 128MB memory limit. More is better, less might break your site.
Add the constant that enables multi-site:

define( 'WP_ALLOW_MULTISITE', TRUE );

Make sure that require_once(ABSPATH . 'wp-settings.php'); is always the last line in that file, put custom code above of it.

Then go to Tools/Network Setup, use Sub-directories or Sub-domains if your are prepared for that (see Multisite on Windows with wildcard subdomains).

Now you get the new code for wp-config.php (remove WP_ALLOW_MULTISITE) …


define( 'MULTISITE',            true       );
// Set this to true for sub-domain installations.
define( 'SUBDOMAIN_INSTALL',    false      );
define( 'DOMAIN_CURRENT_SITE',  'mstest.wp');
define( 'PATH_CURRENT_SITE',    '/'        );
define( 'SITE_ID_CURRENT_SITE', 1          );
define( 'BLOG_ID_CURRENT_SITE', 1          );

… and .htaccess, replace the default WordPress rules with this:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [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]

Log in again, and you are done.