Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

Multisite > Setup as Subdomain

The section below explains how to install a Multisite as a subdomain.

Localhost Setup

Edit your hosts file to account for all subdomains that are contained in the multisite package and then install to localhost.com which you set up as an alias for localhost.The hosts file locationon windows is: “C:\Windows\System32\drivers\etc” and on MAC” and on MAC “/private/etc/hosts”. For example if you have a package with amultisite containing subsites myoriginalsite.com, sub1.myoriginalsite.com and sub2.myoriginalsite.com.

To install this multisite on localhost do the following:

  1. Open your hosts file in a text editor.
  2. Add the following to the hosts file:127.0.0.1 localhost.com
    127.0.0.1 sub1.localhost.com
    127.0.0.1 sub2.localhost.com
  3. Save the hosts file
  4. Browse to http://localhost.com/installer.php and proceed with the install.

After the installer completes you should be able to properly view localhost.com, sub1.localhost.com and sub2.localhost.com.

Hosting Provider

When working with a public facing server make sure you have set up wildcard DNS if you haven’t already (or create specific DNS records for each subdomain site).The article Configuring Wildcard Subdomains explains how to set up wildcard DNS for use with multisite.

Was this article helpful?

Related Articles