Introduction to wordpress multisite with an example

Author - Manju Kashyap
30.01.2019
|
0 Comments
|

Introduction to wordpress multisite with an example

What is WordPress Multisite?
Multisite is a feature in wordpress which you can use to manage multiple sites within single wordpress admin site. Before the release of the WordPress 3.0, there was a separate software called WordPress MU or Multi-User which was a standalone version of WordPress that allowed one “superadmin” to govern multiple other virtual WordPress websites from the single WordPress MU installation. So, each website under MU could be parceled out to different users as their own WordPress website, under the central control of the superadmin.

Then with the launch of WordPress 3.0, MU got merged into WordPress core. It retained the same functionality but it was renamed as Multisite. This feature can be enabled using the WordPress dashboard with a small amount of file editing in the wordpress installation.

Steps to activate multisite feature
I am assuming that you are already using wordpress 3.0(or later) version. So follow these steps for the settings:

1. Add a single code statement (in red box below) in the wp-config.php file above this statement:

/* That’s all, stop editing! Happy blogging. */
Introduction to wordpress multisite with an example

2. Once you have enabled multisite through wp-config.php and saved the file, you will see a new option in your tools menu with title as “Network Setup” as below:

Introduction to wordpress multisite with an example
3. When you click on this network tab, you will see the following screen:
Introduction to wordpress multisite with an example

So copy the mentioned lines and paste in the required files i.e. wp-config.php and .htacess files:

The code that needs to be added to these files depends on your existing website structure and whether you are using a subdomain or subdirectory structure for your network. For example, the code I had to add to my test website was:

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

Remember to add the above code to your wp-config.php file before the

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

Please make sure that the above code needs to replace any existing WordPress rules in your .htaccess file. It should not just be added to the file It needs to be added between the # BEGIN WordPress and # END WordPress tags. Like below:

# BEGIN WordPress
<IfModule mod_rewrite.c>
 
//New .htaccess code goes here
 
</IfModule>
# END WordPress

4. Once you have updated your wp-config.php and .htaccess files, you should reload your website. You will be asked to login again. Once you have done this, you will be taken to your network dashboard and you can see and create your new websites by navigating to the My Sites/Network Admin/ Sites like below:
Introduction to wordpress multisite with an example
Introduction to wordpress multisite with an example
It will display the list of existing sites (if any) and you can create your own site by clicking the Add New button as below:

Introduction to wordpress multisite with an example

On filling the details like site address and site title and click the Add Site link, the new site will be added and will show in the list of site when you see in the main admin account as below:

Introduction to wordpress multisite with an example
When you click on the site link it will open the edit site window where you can edit the name or url of the site if you want or you can also visit the child site or it’s admin dashboard by clicking on the visit | dashboard links as below:

Introduction to wordpress multisite with an example

Introduction to wordpress multisite with an example

You can see the custom domain in the browser url now.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *