Skip to content

WordPress Multisite: when it's worth it and how to set it up properly

· The AYT team · 9 min read

Man typing on a laptop at a wooden table, with a phone and notebook beside it

WordPress Multisite is a WordPress feature that runs several sites from one install: the same files, the same database and one network administrator who installs themes and plugins for all of them. It's worth it when you manage many similar sites that stay under your control, such as a company's branches or a school's departments. It isn't worth it when the sites have different owners, need different plugins or must be movable on their own.

How a Multisite network works

Once enabled, Multisite turns the install into a "network". A few new things appear:

  • Super Admin, the role that runs the whole network. Only Super Admins install plugins and themes, create sites and change network settings.
  • Network Admin, a separate dashboard, opened from the My Sites menu, where those tasks are done.
  • The network's sites. Each has its own wp-admin, posts, pages, menus and settings, and its administrator manages content, not code.

In the database, users live in one table for the whole network, and each site gets its own tables with a numbered prefix: wp_2_posts, wp_3_posts and so on. Uploaded files go to wp-content/uploads/sites/2/, sites/3/ and so on. A plugin is installed once and activated either network-wide (Network Activate) or on each site separately.

Subdomains or subdirectories

During setup you choose what new sites' addresses look like. You can change it later, but not easily, so it's worth getting right from the start.

Criterion Subdomains Subdirectories
A site's address london.company.com company.com/london
DNS one record per subdomain, or a wildcard (*.company.com) nothing extra
SSL certificate must cover every subdomain; in practice a wildcard certificate the same certificate as the main domain
Restrictions WordPress must be installed at the domain's root you can't choose subdirectories if the install is more than a month old

The one-month restriction comes from permalinks: an existing post at company.com/london would clash with a new site called london. For the same reason, posts on the main site get a /blog/ prefix in their address.

A custom domain for each site

Any site in the network can have its own domain, for example company-london.com instead of london.company.com. The feature is called domain mapping and has been part of WordPress since version 4.5, with no plugin. There are three steps: the domain must point to the same server (the A record), it needs an SSL certificate, and in Network Admin → Sites → Edit you change "Site Address (URL)" to https://company-london.com.

If logging in stops working on that site after mapping, or you see a message about blocked cookies, the WordPress documentation recommends this line in wp-config.php, after the network code:

define( 'COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );

When Multisite is worth it

Multisite suits sites that resemble each other and have the same owner:

  • a company with branches or franchises, each with its own site but the same theme and plugins;
  • a university or school with sites for faculties, departments or projects;
  • a publication with local editions;
  • a platform where users open their own blogs;
  • a multilingual site where each language is a separate site in the network, with a multilingual plugin built for Multisite.

The gain is in maintenance: you update WordPress, the theme and the plugins once for every site, and a new plugin is available across the network straight away.

When it isn't

Multisite ties the sites together. In many situations that tie is a drawback:

  • Sites belonging to different clients. A site's administrator can't install plugins or themes, and a breach through a vulnerable plugin reaches every site, because they share files and the database. For clients, separate accounts are the right choice (we wrote about this in the guide for agencies hosting client sites).
  • Sites that need different plugins or PHP versions. The network runs on one PHP version, and a plugin that isn't Multisite-compatible can't be used on any site.
  • Sites that have to leave separately. There's no button that takes a site out of the network; you export it and rebuild it as a separate install.
  • Restoring a single site. The backup holds the whole network, and restoring one site means picking its tables and files by hand.
Criterion Multisite Separate installs
Updates once for the whole network on each site (or from a shared panel)
Plugins installed by the Super Admin, the same for all each site has what it wants
Users one account for the whole network separate accounts on each site
PHP version the same for every site chosen per site
Isolation sites share files and the database each site stands alone
Moving a site export and rebuild copy the site as it is

How to set up Multisite on an existing site

First, take a full backup (see the WordPress backup guide), check that pretty permalinks work and deactivate every plugin. You reactivate them once the network is ready.

  1. Open wp-config.php and add, above the "That's all, stop editing!" comment:

    define( 'WP_ALLOW_MULTISITE', true );
    
  2. Reload wp-admin and go to Tools → Network Setup.

  3. Choose subdomains or subdirectories, enter the network title and the administrator's email, then click Install.

  4. WordPress shows you a few lines for wp-config.php. Put them right below the line from step 1. They look roughly like this:

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    define( 'DOMAIN_CURRENT_SITE', 'company.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    
  5. On the same screen you get rules for .htaccess. On an Apache server, they replace the existing WordPress rules. On nginx that file isn't read, and your host has to put the equivalent rules in the server configuration; without them, with subdirectories, company.com/london/wp-admin/ returns a 404. The difference is explained in the guide to .htaccess on nginx.

  6. Log in again. The top bar now shows My Sites → Network Admin, and you add new sites under Sites → Add New.

  7. Reactivate the plugins: the ones the whole network needs (security, cache, SMTP) from Network Admin, the others on each site.

Settings to check after setup

Network Admin → Settings has a few defaults that trip beginners up:

  • Max upload file size starts at 1,500 KB, so a photo from a phone can be refused. Raise it here as well as in PHP. PHP's own limits are explained in the guide to upload_max_filesize and post_max_size.
  • Site upload space per site, 100 MB by default, if the limit is ticked.
  • The file types allowed for upload.
  • The Plugins menu for site administrators: tick it only if you want them to activate or deactivate the plugins you installed.
  • Registration: whether anyone can create an account or a site. For a company network, keep it off.

Users and roles in the network

A user account exists once in the network but has a separate role on each site: the same person can be an Administrator on london.company.com and an Author on paris.company.com, with the same password. The Administrator role means less than on a single site: it covers the site's content, users and settings, but can't install plugins, switch to a theme not enabled for the network, or edit files. A Super Admin can reach every site, so give that role only to people who actually run the network, and turn on two-factor authentication for them (the steps are in the WordPress 2FA guide).

Multisite and WooCommerce

WooCommerce runs on Multisite, but each site in the network is a separate shop with its own products, orders and customers. The cart isn't shared between sites, and stock doesn't sync without a dedicated plugin. If you want one shop in several languages, or several shops sharing stock, first compare the cost of sync plugins with that of separate shops.

Updates, backups and speed

After a WordPress update, Network Admin asks you to run Upgrade Network, which brings each site's database up to date. On large networks this can take a few minutes.

The backup covers the whole network, so test a restore on a copy now and then. For speed, networks with many sites gain a lot from an object cache, because each site reads its settings from the database on every request; the details are in the guide to Redis Object Cache. WP-Cron runs separately for each site in the network, so a real cron has to reach all of them.

Frequently asked questions

Can each site in the network have its own domain?

Yes. Since WordPress 4.5, domain mapping is built in: point the domain at the server, give it a certificate and change the site's address in Network Admin → Sites → Edit.

Can I take a site out of the network later?

Yes, but by hand. Export the content from Tools → Export or with a migration plugin, then import it into a new WordPress install and reinstall the theme and plugins.

Is Multisite faster than several separate sites?

Not by itself. The gain is in maintenance: pages are built the same way, and a big network needs a page cache and an object cache like any busy site.

Multisite on AYT hosting

On AYT WordPress hosting, the WordPress Toolkit installs WordPress in one click as a single site or as Multisite, on subdirectories or subdomains. For subdomain networks, the Let's Encrypt certificate is a wildcard certificate, issued and renewed automatically, and for subdirectory networks the nginx rules for company.com/london/wp-admin/ are already in the site's configuration. When you switch WP-Cron off in the toolkit, the job in Cron Jobs runs the cron for every site in the network. Redis and daily backups work just as they do for a single site; a staging copy can't be made for a Multisite network yet.

If you want to host your clients' sites, don't put them in a Multisite network. The Partner (reseller) plans give you a panel where you create an isolated account for each client, with its own PHP, files and database.

More articles

All articles