Easily Setting up a WordPress MultiSite Network

Posted OnNov 28, 2013     CategoryDevelopment     CommentsNo comment

In this guide we’ll be running through the necessary steps to set up a WordPress MultiSite network. You will need FTP, SFTP, or SSH access to your server and Administrator level access to WordPress.

Step 1) Install WordPress, you can do this through your host’s CPanel (most common) or use SSH depending on your server’s configuration.

Step 2) Log in to your fresh WordPress install, and change your permalinks to be %postname%, also known as pretty permalinks, as if these don’t work you will not be able to continue.

Step 3) Connect to your server and open wp-config.php, add the following line just above the ‘stop editing’ comment and save. This will enable the MultiSite functionality in your WordPress install.

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
/* That's all, stop editing! Happy blogging. */

Step 3) Head back into the WordPress Dashboard, and under the Tools menu, you’ll now have “Network Setup” available, click this and move on.

network setup

Step 4) Here we need to choose between subdomains or subdirectories, whereby the difference is

  • subdomains: sitename.domain.com
  • subdirectories: domain.com/sitename

Choose what you feel is best for your needs, but please note that you are unable to change this later.

When you’re ready, click Install.

Step 5) WordPress will now give you the necessary details to add to your wp-config.php and .htaccess files, and should look similar to the following:

For wp-config.php:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'www.example.dev');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

For .htaccess:

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

Step 6) These steps so far will boot you from the WordPress Dashboard, so log back in and lets see what we can do.

First of all you will note the “My Sites” item in the top menu which is where you can access the Network Administrator Dashboard.

network admin

Step 7) Add a new site by clicking Sites » Add New, fill in the details and finish up with Add Site

add a new site

Now you can head over to your new site, such as http://site1.example.dev in my case, and confirm it’s working as intended.

wordpress multisite install successful

From here, the Network Admin Dashboard(/wp-admin/network/), you can add more sites, manage your existing sites, as well as install and update themes and plugins.

network admin

Leave a Reply

Your email address will not be published. Required fields are marked *

Send this to friend