We can make the WordPress sites as Multisite or Network of sites which will make the management of sites really simple for the administrator who is going to handle multiple client sites. As part of this exercise, we moved couple of our clients websites into this network of sites.
The below steps makes the any WordPress websites to Multisites.
Step 1
Go to your hosting cPanel -> File manager and navigate to the file location where the WordPress is installed.
Open the “wp-config.php” in edit mode and add the following lines above where it says /* That's all, stop editing! Happy blogging. */
.
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
Save the file.
Step 2
Login to WordPress as Administrator. Navigate to Tools, we will see new menu item “Network Setup”.
Step 3
Choose the subdirectory options to create new sites
Step 4
Update the following details in the respective files
wp-config.php
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
.htaccess
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]
Leave a Reply