WordPress Multisite on Barbrick

multisite, network, subdomain, subfolder, wildcard, wp-config · 0 found this helpful

Multisite runs many WordPress sites from one WordPress install. A university or franchise uses it to share themes and plugins. For most small businesses, separate WordPress installs are simpler and safer.

Should you use it?

You want Choose
Several unrelated sites Separate installs. Business covers 5 sites, Pro is unlimited
One brand, many regional sites with shared plugins Multisite
A site and a blog on one domain One site

Everything on a network shares resources, plugins, and updates, so one bad plugin affects every site. A big network will hit resource limits sooner. For more than a few sites on a network, Pro is the better fit.

Enable it

Take a backup first. Then:

  1. Add this to wp-config.php (open it in Files), above /* That's all, stop editing! */:
define( 'WP_ALLOW_MULTISITE', true );
  1. Go to Tools → Network Setup in wp-admin.
  2. Choose Sub-domains or Sub-directories.
  3. WordPress shows blocks of code. Paste the wp-config.php block, and replace the .htaccess rules with the ones shown.
# Subdirectory network rules (as generated by WordPress)
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
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]
  1. Sign in again.

With WP-CLI: wp core multisite-convert (add --subdomains for subdomain mode).

Subdomain versus subfolder

Subfolder Subdomain
Address example.ca/halifax halifax.example.ca
DNS None A wildcard subdomain *.example.ca (ask us at https://barbrick.ca/submitticket.php), or one subdomain per site added in Account → Hosting → your site → Websites
SSL One certificate AutoSSL covers each subdomain you create. With a wildcard subdomain and your DNS on Barbrick's nameservers, AutoSSL can issue a wildcard certificate
Setup Easiest More work

Choose subfolders unless you need separate subdomains.

Own domain per site

Install a domain-mapping setup (WordPress supports it natively in Sites → Edit → Site Address). Add each domain as an addon domain pointing at the main install's folder.

Limits

  • The WordPress section supports multisite only partly. Staging copies and Smart Update don't work on a network, so update by hand after a backup.
  • Backups cover the whole network, and you restore the whole network.

Was this helpful?

Still stuck? Ask us and we'll walk you through it.