Enabling WordPress Multisite Feature
WordPress multisite functionality comes built-in with WordPress, but it is turned off by default. You’ll need to enable it in order to set up your WordPress multisite.
For that, you’ll need to edit the wp-config.php file. It is the WordPress configuration file that contains all the important settings for your WordPress installation.
Inside this file, you will need to add the following line just above the line that says ‘That’s all, stop editing! Happy publishing’.
define( 'WP_ALLOW_MULTISITE', true )
After that, don’t forget to save your changes and upload the file back to your website.
Now you need to switch back to your WordPress admin dashboard and reload the admin dashboard page. After that, you need to visit the Tools » Network Setup page to configure your WordPress multisite network.
First, you need to choose subdomains as ‘Addresses of Sites in your Network’ provide a title for your multisite network and network admin email address.
Click on the ‘Install’ button to continue.
On the next screen, WordPress will ask you to add two pieces of code.
The first one goes into your wp-config.php file just above the line reading ‘That’s all, stop editing! Happy publishing’.
Apart from the code shown by WordPress, you also need to add the following line to your wp-config.php file. This line ensures that users can login to each site.
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
The second piece of goes into your WordPress .htaccess file replacing the default WordPress .htaccess rules.
Once you have added both codes to the respective files, you’ll need to login to your WordPress admin dashboard.
After login, you will see a new menu item in the admin bar titled ‘My Sites’. Take your mouse over it and then select ‘Network Admin » Dashboard’ link.
Creating New Sites Using Custom Domains in WordPress Multisite
Now that everything is set up, let’s create your first site using a different domain name.
From your multisite’s network admin dashboard, click on the Sites » Add New page.