We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

Tutorials
More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsWordPressWordPress Administration

How to setup multisite using WordPress

cPanel KVM
USA VPS
OpenVZ VPS
Linux KVM Hosting
Linux Cloud Server
Windows Cloud Server
Ubuntu VPS
KVM VPS
Germany Cloud Servers
Brazil VPS
Follow these steps to set up multisite

Multisite allows to have more than one website in single WordPress installation. To setup such feature, we will need to make a modification to WordPress configuration file. First of all, connect to the hosting account through FTP or built in file manager and find file wp-config.php which is usually located in WordPress installation directory.

WordPress Configuration File

Open it for editing and find the line which says:

1
/* That's all, stop editing! Happy blogging. */

Then place the following line right after the mentioned line:

1
define('WP_ALLOW_MULTISITE', true);

Save WordPress configuration file and close it. Now we are ready to install multisite in the current WordPress installation. To do this, login to WordPress dashboard and navigate to Tools>Network Setup.

WordPress Network Setup

There we should see the following details of our new network:

WordPress Network Details

In this case, server address means domain name we are using to access WordPress website. Network Title – the title for the network. Admin E-mail Address – WordPress network administrator email address. Verify all details are correct and click Install button to proceed with network installation.

WordPress Network Install

After that we will need to complete several steps in order to setup network completely. This will involve WordPress configuration file (wp-config.php) and .htaccess modifications. Due to this it’s recommended to backup them in order to have fresh copies in the case something would go wrong.

Once the mentioned files are safely copied to another place, open WordPress configuration file – wp.config.php for editing and find the following line:

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

Place required code below:

1
2
3
4
5
6
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.domain.com');
define('PATH_CURRENT_SITE', '/blog/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Then open file .htaccess for editing and place the following lines by replacing existing ones if there are any:

1
2
3
4
5
6
7
8
9
10
11
12
13
RewriteEngine On
RewriteBase /blog/
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]

Once we are done with those modifications, we will need to logout and login again to the WordPress dashboard in order to apply changes. Then we should see some changes in the dashboard as shown in the image below.

WordPress My Sites

If we can see new tab named “My Sites” in the toolbar, this means multisite has been installed successfully. From now WordPress is ready to be used with multiple websites in the single installation.

Germany Cloud Servers
cPanel KVM
Ubuntu VPS
Windows Cloud Server
KVM VPS
OpenVZ VPS
Linux KVM Hosting
USA VPS
Brazil VPS
Linux Cloud Server
Rate this Tutorial:
No Comments Leave a Comment
Leave a Comment

Other (182)

Popular Keywords