Setting Up WordPress MU Domain Mapping Multisite On localhost

Published on 11 November 2016 by John Carter

If you use http-vhosts to set up your local domains you might find the following guide useful to set up a local installation of WordPress Multisite using MU domain mapping.

  1. Set up the primary site up as per WordPress Multisite and MU Domain Mapping documentation
  2. Now set up your hosts and http-vhosts to allow for the management of the domain mapping:
  3. Add both 127.0.0.1 www.primary.dev and 127.0.0.1 www.secondary.dev to your hosts file
  4. In http-vhosts set the primary domain as follows:

     
  5. And the secondary to point at the same directory, but with a different server name and alias:

     

Hope that helps someone out.