Multisite with Local

What is WordPress Multisite?

A WordPress multisite network (or “multisite” for short) is a collection of sites that all share the same WordPress installation and database. These sites can also share plugins and themes that can be managed and updated network-wide. Multisite installs are great for projects that include an umbrella site.

For example, a University might want to use a WordPress multisite. This would allow them to have all students and professors contained within one WordPress installation, but have each department manage the content for their own subsite!

Types of Multisites: 

There are two types of WordPress multisites:

Multisites aren’t always the best solution

Not every project is a good candidate for a multisite. This article on WordPress.org has some great things to consider before using a multisite for your project:

Limitations of Multisite with Local: 

Create a new Multisite in Local

Creating a multisite in Local is easy as long as you keep a couple of things in mind!

You’ll need to have Local’s Router Mode set to “Site Domains.” Multisites won’t work in Local if the Router Mode is set to localhost.

More details about Local’s Router Mode feature can be found in this help doc.

The steps below will help walk you through creating your multisite in Local! 

  1. Click on the green plus symbol in the bottom left of the app window.
  2. Name the site, and click Continue.
  3. Choose your environment type, and click Continue.
  4. Enter in the username, password, and email address you wish to use. 
  5. Click the Advanced Options and select the type of multisite to install.
  6. Click Add Site to finish creating your site!
A screenshot with options for creating a multisite in Local.

Once Local finishes building the site, you can verify that everything is working by creating a new subsite!

To do this, log into the WP admin and navigate to “My Sites > Network Admin > Sites” and click the “Add new” button.

note

Syncing Subdomains

Because subdomain multisites involve creating additional domains they take a little more effort to register those domains with the computer.

After creating a new subsite in WordPress, navigate to Local and click the “Sync Multi-Site domains to hosts file” button.

This will query the WordPress installation and find all of the subdomains of the subsites and update the computer’s hosts file so that the browser can find the correct WordPress site.

Import a WordPress Multisite into Local

*Note: At this time Local Connect is not compatible with WordPress multisite. 

Because multisites require configuration changes to the server software (like nginx or Apache), it’s a more manual process to import a multisite than it is to import a regular WordPress site.

To import your multisite you’ll need to follow the steps below!

For Step 3, overwrite the wp-content folder of the newly created Multisite with the wp-content folder from your backup.
For the final step, open Adminer from the Database tab and select the “SQL Command” link.

Deploy a Multisite from Local

Because Local Connect is not compatible with WordPress multisites, in order to deploy your changes, you’ll need to go through a more manual process.

Option 1:

Perform a manual migration to the remote environment using the steps below.


Option 2:

If using Flywheel, you can export your Multisite from Local, by right-clicking on the site and selecting Export.

From there, request a free migration to have our migration team create a site for you on Flywheel!

note

The process above is for deploying the entire multisite network and will not work for individual sub-sites.