Site icon Treehouse Blog

Getting Started with WordPress Multisite

What is WordPress Multisite?

With WordPress 3.0 came the ability to create a Network of sites from a single install of WordPress, commonly referred to as WordPress Multisite (MS). The best example of this in action is, the massive WordPress MS install from Automattic.

Although often recommended for creating sites with disconnected content, it is possible to share pages, posts and even custom post types across sites.

How to Setup Multisite

By default, WordPress ships with multisite disabled. To enable the feature you have to add a line of code to your wp-config.php file.

Under the line where it says /* That’s all, stop editing! Happy blogging. */ add the following code:

/* Enable Multisite */
define('WP_ALLOW_MULTISITE', true);

Once you add this save this, go to Tools > Network Setup. From there you can decide whether you want to use subdomains for your site URLs or subdirectories.

It is possible, using a plugin like WordPress MU Domain Mapping, to use different domain names for the different sites. This process does require some more advanced knowledge of WordPress as well as working with servers.

Once you choose your URL method of choice you will have to make one more round of updates:

  1. Create a blog.dir folder in your wp-content directory and make writable
  2. Add the provided code into your wp-config.php file. Change where it says ‘’ to the url for your main site.
    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]
  3. Replace your .htacess file code with following code.
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

From here you will have access to the My Sites menu in the top admin bar. To add a new site go to My Sites > Network Admin > Sites and click on Add New.

To create a new site just enter in the url for the site, either sub-domain or sub-directory, the site title and an email address for the site admin (can be the email of an existing user).

If public registration for new sites is enabled under Network Admin > Settings > Network Settings, users can also sign up new sites by going to /wp-signup.php.

If you plan to let people create new sites, look into a plugin like Multisite User Registration Manager.

For more detailed information on the WordPress multisite setup process and adding new sites, see the Create a Network article on the codex.

How Plugins and Themes work with Multisites

Individual sites cannot install their own themes and plugins directly. They must be installed at a global level. Once installed, a plugin or theme is available to all networked sites. An additional option lets you activate a plugin across all sites.

Sites can pick their own themes, but cannot edit the theme template files on a per site basis. When theme templates are edited they apply across all sites. Only network admins have the theme editor option available in the admin area.

Although all themes should technically work for MS, you may want to look for themes specifically designed and tested for Multisite. When you’re looking for plugins, you will want to make sure that they work with MS. There are also some plugins designed specifically for managing and improving MS sites, like these and these, that you will want to familiarize yourself with.

Two powerful plugins for WordPress MS are BuddyPress and bbPress from Automattic. BuddyPress adds powerful social networking features to a Multisite install. You should definitely look into it if you want social networking features on your Network. bbPress is a WordPress Forum plugin that will let you create forums on your individual sites on the Network.

Managing a Multisite Installation

There is a big difference between managing a single WP install and a MS install. Some things you may want to keep in mind:

Further Resources

For some more advanced tips, check out Wes Chyrchel’s slide deck on Multisite Tips, Tricks and Hacks.

Accessing if Multisite is right
Setting it up
WordPress Mulitsite on MAMP
More advanced tips

Some recommended plugins:

Exit mobile version