How To Install Multisite in WP(WordPress)

1) Go to file wp-config.php, which is is located in the main directory of your WordPress, and add the line
define('WP_ALLOW_MULTISITE', true);

2) Then go to WordPress Dashboard -> Tools and select Network setup

3) Then go to file wp-config.php and add the content below.

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', '');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define ('DISALLOW_FILE_EDIT', false);

4) Then go to file .htaccess and change the RewriteRule content below:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
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]

5) Then go to My Sites -> Sites and create new site:

Leave a Reply