Solution:2
To begin with, make certain that you have administrator rights to access your computer’s file system. This is because you’ll need privileges to create directories and edit files.
We’ll presume that you’ve installed WordPress on your computer already. But just in case you need help with this, you can always look into our earlier guide.
Note. This is a required step. In order to follow through and install WordPress multisite on your local computer, you first need to have a standard WordPress installation running. Again, please check out our other guide – it’s a step-by-step tutorial, quite easy to follow.
To install WordPress multisite locally and create a network of any number of sites on your own computer, follow these steps:
Before you start:
Choice of URL: Now’s the time to decide whether to install additional sites in a sub-directory or under a sub-domain. It’s important to realize that you cannot change this later.
- A sub-domain URL for the individual sites will read: site1.YOURSITE.com, site2.YOURSITE.com
- A sub-directory URL for the individual sites will read: YOURSITE.com/site1, YOURSITE.com/site2
On a live server, you can install both under a sub-domain or a sub-directory. Installing a sub-domain on a local host is a little more technical. It involves configuring the XAMPP application to create a sub-domain and then registering it in the operating system software files. In this post, we’ll deal with only a sub-directory installation on the local server.
Enabling the Multisite Feature
1. Adding the multisite feature:
Firstly, open your wp-config.php file and find the line, ‘/* That’s all, stop editing! Happy blogging. */‘ towards the end. Just above this phrase, add this piece of code:
define('WP_ALLOW_MULTISITE', true);
Then save and close the file.
2. Setting up your network:
At this point, you should see a new item in your WordPress dashboard. Specifically, go to Tools > Network Setup. Once there, choose either sub-domains or sub directories.
If you’re going with a sub-domain network on a live server, you’ll need to obtain something called a wild card DNS from your hosting service provider. Since, we’re only doing a sub-directory install on a local server, you do not need any permissions. Fill in the details and then click on install.