Check this Out!Visit our social network pages for recent updates!

How to Install Multiple WordPress using WordPress Multisite?

Hi, please write a simple tutorial on installing WordPress with Multisite enabled to help students and new users.

Hi, this simple tutorial is going to show you how to install WordPress with Multisite enabled. This will allow webmasters and website owners run multiple WordPress sites from a single installation.

Many of the tutorials you’ll read online relate to single WordPress installation. A cool feature about WordPress the few people know about is Multisite. Multisite enable webmasters to run multiple websites from  a single WordPress installation. This brief tutorial is going to show you how it’s done.

Step 1: Prerequisites

Before you can enable WordPress Multisite, you must first install WordPress. To do that, read this post below.

When following the post below to install WordPress, please stop on Step 7. Do not do Step 8 just yet.

https://websiteforstudents.com/question/install-wordpress-ubuntu-servers/

After installing WordPress, continue below to step 2.

Step 2: Enabling WordPress Multisite

To enable WordPress Multisite, open WordPress default site configuration file by running the commands below.

sudo nano /var/www/html/wp-config.php

Then add the line below in the file and save it. Important, the code below should be placed just above the line that reads

“Add the following line above “/* That’s all, stop editing! Happy blogging. */”

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

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

By doing this enables Multisite function for WordPress. Now that Multisite is enabled, open your web browser and go install WordPress by going to your server host or IP address.

WordPress default setup page

Step 3: Install WordPress Multisite Configurations

When you have installed WordPress, login and go to Tool –> Network Setup as shown the image below.

wordpress multisite installation

Then, fill out your info as shown on the page below and click the Install button.

wordpress multisite install

When you install, WordPress will show you content for wp-config.php and .htaccess  files. Copy each section and paste them in the correct files shown to you below.

wordpress network install multisite

The content for wp-config.php should be:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

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

For your .htaccess file, copy and paste the content below:

RewriteEngine On
RewriteBase /
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]

Step 4: Enable Apache2 Rewrite

One important aspect is to enable Apache2 rewrite module. This module enables WordPress to function properly with Apache2. To enable the module, run the commands below.

sudo a2enmod rewrite

Restart Apache2 by running the commands below.

sudo systemctl restart apache2

Step 5: Go create additional WordPress sites

After making the above changes, log back into WordPress and begin creating multiple WordPress site. To access Multisite in WordPress, go to My Sites –> WordPress Multisite –> Dashboard.

wordpress multisite function

Create additional sites by going to My Site –> Network Admin –> Add New Site. Then define the new site info and click Add.

wordpress multisite

That’s it You should be able to create multiple WordPress sites from here.

Enjoy!