WordPress

WordPress Multisite or WordPress Network or WPMU - any of these refer to WordPress when it has been setup as a network of blogs or websites.

I’ve been using WordPress Multisite for about 3 years now - many more famous WordPress people have written about setting up WordPress Multisite, but this is my take on it.

I want to show you that it is easy to get started with WordPress Multisite in fact you can have your network of WordPress sites up in under 5 minutes (supposing you already have WordPress installed).

 

How to Enable WordPress Multisite

WP-Config - Enable Multisite

Open your favorite editor and then open wp-config.php which is in the root of your WordPress directory.

Insert these 2 lines in your wp-config.php file, save the file.

define('WP_ALLOW_MULTISITE', true); //or true

WordPress Admin - Network Settings

Login to WordPress Admin and turn off all your plugins first … then go to the link for Network Setup.

Follow the instructions carefully and edit your wp-config.php again - and also edit your .htaccess file.

Then you’re all done.

WP-Config - Additional Settings

Add these extra changes to wp-config.php

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN\_CURRENT\_SITE', 'http://your_website.com');
define('PATH\_CURRENT\_SITE', '/');
define('SITE\_ID\_CURRENT_SITE', 1);
define('BLOG\_ID\_CURRENT_SITE', 1);

If you wanted, you can delete the 2 lines you added before - but this will hide the Network Settings menu links.

.htaccess - Multisite Rewrite Rules

Add these to your .htaccess file, replacing all the existing WordPress rules. If you can’t save the .htaccess file, or you can’t access wp-admin after making these changes, then check your permissions on the file or check with your ISP that Permissions are set properly including Allow Overrides=On for your virtualhost file.

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

\# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

\# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*.php)$ $1 [L]
RewriteRule . index.php [L]

Finished

Once you’ve saved both the WP-Config.php and .htaccess files - then click the link to Log back in.

You’re all done here - Now you can go to the Network Settings Admin page and setup your new WordPress Multisite.