Search
Close this search box.
Search
Close this search box.

WordPress Multisite

Installation

This guide describes how to install manually WordPress Multisite in your current WordPress installation.

01. Your existing WordPress site will be updated when creating a network. Unless this is a fresh install and you have nothing to lose, please backup your database and files.

02. Deactivate all active plugins. You can reactivate them again after the network is created.

03. To enable the Network Setup menu item, you must first define multisite in the wp-config.php file.
Open up wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */.

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

04. The previous step enables the Network Setup item in your Tools menu. Use that menu item to go to the Create a Network of WordPress Sites screen.

05. Press install.

06. To enable your network, follow the instructions on the Create a Network of WordPress Sites screen. The instructions that you see are customized for your installation. Back up your existing wp-config.php and .htaccess files, unless this is a fresh install and you have nothing to lose. After completing these steps, log in again using the link provided. You might have to clear your browser’s cache and cookies in order to log in.

Multisite conditionals

A very usuful php conditional for multisites is the following:

global $blog_id;
if ($blog_id == 1) {
    // we are on the first site
} else if ($blog_id == 2) {
    // we are on the second site
}

Learning Resources