What is Multisite Wordpess and How to Enable it – Full Guide

WordPress Platform is so popular for building websites just because of its amazing features. You can doas much customization  as possible.  in this article, I am going to show you an another feature that is not much popular and may be you are not familiar with it. This feature is called “WordPress Multisite.” WordPress Multisite was a part of  WordPress Multiuser project that was discontinued. And later on, it’s features were included in WordPress Core.

What is WordPress Multisite  (WPMU) 

The Codex defines WordPress Multisite as:

“A feature of WordPress 3.0 and later versions that allows multiple virtual sites to share a single WordPress installation.”

WordPress Multisite is a Feature which was launched in 2010 in WordPress 3.0 and replaced the old WordPress MU system. Multisite WordPress feature is basically a Network of Websites that allows you to run multiple sites on a single installation of WordPress.  You can manage your themes, plugins, user roles, features and approx everything in a single WordPress installation. You can either enable Multiple WordPress on your subdomain ( xyz.example.com or in the directories (masterji.net/example) on single WordPress hosting.  In WordPress Multiple there is a single database, so you don’t have to create a different database for every subdomain or directory.

Wordpress Multisite

WordPress MultisiteThis is how the WordPress Multisite Dashboard looks like.

Wordpress multisite dashboard

WordPress MultiSiteDashboard

A lot of Websites are using WordPress Multiple Feature and wordpress.com is one of the best example.

wordpress.com is hosting million of websites in a single database and this is possible just because of WordPress Multiple.

Advantages and Disadvantages of WordPress Multiple

Everything has some pros and well as some cons, and the same thing applies on WordPress Multiple too. I am listing some pros and cons of WordPress Multiple which will helpful for you.

Advantages of WordPress Multiple

  • Installation is done in simple steps. Add as much as sites you want.
  • You don’t need different hosting account or different installations to install WordPress on directory or subdomain.
  • There are different access levels, and users can manage only one website or every website using the same account.
  • You can update all themes and plugins of all network sites at once in a single click.
  • For a Super Admin, it is possible to manage privacy settings and decide what options or features the users will have access to.
  • The network admin can decide whether WordPress themes and plugins can be shared across multiple websites or not.
  • All the updates and upgrades are made across multiple sites time which significantly reduces maintenance cost as well as overhead.

Disadvantages of WordPress Multiple

  • Few of the plugins does not work on WordPress Multiple.
  • Managing Databases can be little difficult and confusion creating.
  • Superadmin must have good knowledge about WordPress Multiple because you have to mess up with some codes and such things.
  • You will need more robust hosting or a dedicated server than a normal shared hosting.
  • If your main Superadmin Website got hacked/affected then all the websites in your networks will be affected/hacked.

How to Enable WordPress Multiple

Activating WordPress Multiple is a very easy task. First of all install WordPress, after installing and setting up WordPress simply login to your website server via FTP Clients like FileZilla or WinSCP. If you have Cpanel on your hosting then simply open WP-Config.php file. The WP-Config.php file is located on Public HTML folder or in the VAR/WWW folder.(Depends on hosting or server)

wp config file

wp config file

  • OpenWP-Config.php file and the file will look like the below snippet.
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',    'put your unique phrase here');
define('NONCE_KEY',        'put your unique phrase here');
define('AUTH_SALT',        'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT',   'put your unique phrase here');
define('NONCE_SALT',       'put your unique phrase here');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

You have to add the following code just before the line That’s all, stop editing! Happy blogging.

/* Multisite */
define('WP_ALLOW_MULTISITE', true);
  • Below is the example if you have still some confusion.
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',    'put your unique phrase here');
define('NONCE_KEY',        'put your unique phrase here');
define('AUTH_SALT',        'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT',   'put your unique phrase here');
define('NONCE_SALT',       'put your unique phrase here');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
  • After editing and saving the file refresh your WordPress Dashboard and you will see a new option under Tools>Network Setup. Now here there are 2 options, whether you want to make
  • Now here there are 2 options, whether you want to make network on your sub-domains or on your sub-directories.
  • Select your desired option and click on install button.

  • On the next page, you will get a screen as same as below image. On 1st option, you have to add those codes at place of line that I have written add those codes here  and just aboveThat’s all, stop editing! Happy blogging.” line

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

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',    'put your unique phrase here');
define('NONCE_KEY',        'put your unique phrase here');
define('AUTH_SALT',        'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT',   'put your unique phrase here');
define('NONCE_SALT',       'put your unique phrase here');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
add those codes here
/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
  • After that in 2nd, You have to replace all texts in .hta access file with that 2nd below code
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

The code above is the default code which will be replaced by that new code that is something like the below code

RewriteEngine On
RewriteBase /wordpress/
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]
  • After editing .hta access file, save it and then refresh your website dashboard. Boom! You successfully enabled. WordPress Multiple.
  • Here is a quick recap of these steps:
    • 1. Add define( ‘WP_ALLOW_MULTISITE’, true );
      to your wp-config.php file
    • 2 (a). Visit the network setup page
    • 2 (b). Choose either a subdomain or sub directory structure
    • 2 (c). Enter your network name
    • 2 (d). Enter your admin email
    • 3. Update your wp-config.php file with the code provided
    • 4. Update your .htaccess file with the code provided
    • 5. Log back in to your website

How to Enable Sub-Domains in Multisite

After Enabling WordPress Multiple, you will have to add a subdomain in your WordPress Network. So let’s learn, how to do that…

  • Assuming blog as your subdomain field, First of all create a subdomain like blog.masterji.net. However, this subdomain should point to the same directory where your WordPress is installed.
  • login to your Cpanel account dashboard, search and click on subdomains.
  • Now simply enter “blog” on that space and click on create.
  • Make sure that the document root field is pointing to the directory where you have WordPress installed. This is the directory where wp-config.php file resides. Hit the create button to add the subdomain.
  • Now simply login to your WordPress Multiple Dashboard.
  •  Go to the network admin screens by clicking on My Sites > Network Admin in the admin menu.
  • Go to Sites > Add New.
  • Put “blog” on the empty space and click save. Bingo! You installed a New Website on your subdomain.

How to Enable Directories in WordPress Multiple

  •  Go to the network admin screens by clicking on My Sites > Network Admin in the admin menu.
  • Go to Sites > Add New.
  • Put Site Address.
  • Put Site Title.
  • Put Admin Email to whom you want to make admin.
  • Boom! A New site has been created.

Video Guide for WordPress MultiSite Network Installation.

If you are still stuck on some steps then below is the Video Guide which will help you for sure.

Final Words

I hope I’ve convinced you that WordPress Multisite makes WordPress even more powerful. It lets you create more than one site with just the one WordPress installation, helping you to keep all of your own sites in one place or let others create their own sites which you can make money from.

Activate this feature only if you need it. This feature is just awesome and I am using this WordPress feature in my few websites and it works like a charm.

 

Leave a Reply