Need to set WordPress Multisite up? Multisite is the built-in functionality of WordPress that lets you control numerous websites from one WordPress Admin section. It requires no additional tools, is user-friendly to configure, and supports several websites users can only reach theoretically. Further, it presents an efficient, yet free way to manage websites, which is useful for freelancers, companies, corporations, universities, brands, and so on. With us explaining how to setup a multisite in WordPress, you can’t make a (big) mistake.
1. Decide on a domain structure for multiple WordPress websites
We suggest reading our Multisite guide thoroughly first. But, in summary, the choice of domain structure boils down to three options:
- Using a subdomain — A standard choice that lets you use websites as a subdomain of the main one, e.g.,
https://site1.my-website.com
- Creating subdirectories — A lot of bloggers or companies with sub-brands opt for subdirectories, e.g.,
https://my-website.com/site1
- Using a separate domain — You cannot use a different domain name directly. However, advancements in web technology permit you to use mapped domains (“domain mapping”). That workaround will publicly show a domain name you own (
https://my-second-website.com/
) but will be installed as one of the first two.
Configure a wildcard subdomain (Optional)
If you opt for the first option, and you’ve never created a subdomain, you must do a little work. Otherwise, continue to the next step. We’ll use a default cPanel to demonstrate creating website subdomains:
- Open the cPanel page on your web hosting service and sign in.
- Find the “Domains” section
- Click the Create a New Domain option.
- Enter a subdomain as part of a fully qualified domain name. Because we presume you need multiple websites, you need to generate a “wildcard” domain that is undefined. Thus, enter
*.my-website.com
- Pick a specific location for the root directory if you don’t want the default one, which is Share document root with “example.com” checkbox. Do not select Force HTTPS Redirect.
- Click the Submit button.
2. Activate the WordPress Multisite feature in wp-config.php
Although the feature exists in the source code, it is disabled by default. Therefore, you need to turn on WordPress Multisite in code like this:
- Access your website via FTP. If you have multiple, access the one you plan to use as the network administrator.
- Head to the root folder, i.e., the main directory of your site, and find the wp-config.php file.
- Right-click the file and select View/Edit or only Edit.
- Find the /* That’s all, stop editing! Happy blogging. */ line, and paste this code anywhere above it:
define('WP_ALLOW_MULTISITE', true);
- Save changes and exit.
3. Setup the main website for the WordPress Multisite
The feature is now enabled, but you have yet to start building your network. Follow these steps to begin to setup your WordPress Multisite network:
- Open the WordPress section of the main website.
- Go to the Plugins → Installed Plugins and click on Deactivate under each. If it’s a brand-new installation of WordPress, skip this step.
- Go to Tools → Network Setup in the left sidebar. The option only appears after step 2.
- Select Sub-domains or Sub-directories by clicking the circle in front of the options.
- Give your network a name under “Network Title”.
- Enter the e-mail address under “Network Admin Email”. It can be the same as the one for the head administrator of that website.
- Click the Install button.
4. Add configurations in wp-config.php and network rules to .htaccess
After the previous step, based on the options you chose, WordPress will generate two code snippets you need to add to your website via FTP. The first one goes to wp-config.php, below the one from step 2. Here’s an example of ours:
define(‘MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, true);
define(‘DOMAIN_CURRENT_SITE’, ‘My Website’);
define(‘PATH_CURRENT_SITE’, ‘/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);
The second one will go to the .htaccess file, also in the root directory, and an example of our configuration looks like this:
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]
5. Access the Network Admin dashboard to configure settings for other websites
At this point, you may need to refresh the page or log out and in. You will now notice the new option in the top left corner, next to the WordPress logo. You have one default option, Network Admin. Site-specific options will appear below shortly, depending on how you call them, e.g., Site1, Site2, and with similar options. For now, we need to explain the options available under Network Admin:
Dashboard
Dashboard contains three sub-options: Home, Updates, and Upgrade Network. You will use the last two in the future, to handle WordPress version, theme, and plugin updates. The Home one is pivotal for creating sites and users, starting from the site admins.
Themes and Plugins
We skipped Sites because of step 6 and Users because it’s self-explanatory, letting you add or assign roles based on the user types. Instead, we’ll focus on Themes and Plugins, two options you will use. Going to My Sites → Network Admin → Themes lets you:
- Click Network Enable or Network Disable to make themes available to site admins since they can’t install them
- Use the Add New button to install a WordPress theme. Check our “Best” section for examples based on your niche
- Edit or Delete themes
Moreover, you have an option to make a single theme a default choice with this code snippet in wp-config.php:
define( 'WP_DEFAULT_THEME', 'theme-name' );
Replace theme-name
with the name of the theme in the root/wp-content/themes/
folder. Plugins work the same way, except that the option is titled Network Activate or Network Deactivate.
Settings
Going to Settings → Network Settings lets you configure crucial configurations for your website. For instance, you can enable or disable the site or user registrations, and who can view your websites. Moreover, you can let site admins add users, ban domains you don’t want in your network, configure welcome emails for new sites and customize the default first posts.
6. Setup new websites on the WordPress Multisite network
To add sites to your network, visit the My Sites → Network Admin → Sites section. Then:
- Click the Add New button at the top.
- Add a name under Site Address (URL) based on the configuration, so only type
site1
if you wantsite1.my-website.com
and configure a Site Title. - Pick a language and enter an e-mail address for the site admin, different from the one you used for a network admin. WordPress sends a username and password to a user with that address or creates a new user automatically.
- Click the Add Site button.