PHPackages                             humanmade/mercator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. humanmade/mercator

ActiveWordpress-muplugin[API Development](/categories/api)

humanmade/mercator
==================

WordPress multisite domain mapping for the modern era.

1.0.3(7y ago)529180.9k↑18.1%64[33 issues](https://github.com/humanmade/Mercator/issues)[9 PRs](https://github.com/humanmade/Mercator/pulls)3GPL-2.0+PHP

Since Feb 18Pushed 1y ago68 watchersCompare

[ Source](https://github.com/humanmade/Mercator)[ Packagist](https://packagist.org/packages/humanmade/mercator)[ Docs](https://github.com/humanmade/Mercator)[ RSS](/packages/humanmade-mercator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (10)Used By (3)

   **Mercator**
 WordPress multisite domain mapping for the modern era.   [ ![Build status](https://camo.githubusercontent.com/cf12db8507ccf2dd39cdd638698b918f26c410199a5dfebb7fa04b0f1c202aa4/68747470733a2f2f7472617669732d63692e6f72672f68756d616e6d6164652f4d65726361746f722e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/humanmade/Mercator) [ ![Coverage via codecov.io](https://camo.githubusercontent.com/561391d95ca21d74d174f7e7a749d4c387a983773e973b4fe25aae44fd108158/687474703a2f2f636f6465636f762e696f2f6769746875622f68756d616e6d6164652f4d65726361746f722f636f7665726167652e7376673f6272616e63683d6d6173746572) ](http://codecov.io/github/humanmade/Mercator?branch=master)     A **[Human Made](https://hmn.md/)** project. Maintained by @rmccue.   [![](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)  Mercator is a domain mapping plugin for the New World. Using new features included with WordPress 3.9 and later, Mercator builds on the new multisite features and abilities to improve your world.

Stop using outdated practices, and start making sense.

Requirements
------------

[](#requirements)

Mercator requires WordPress 3.9 or newer for the new sunrise processes. Mercator also requires PHP 5.3+ due to the use of namespaced code.

What is Domain Mapping?
-----------------------

[](#what-is-domain-mapping)

When setting up a Multisite install, the network is configured to create sites either as subdomains of the root site (e.g. `subsite.network.com`) or subfolders (e.g. `network.com/subsite`).

Domain Mapping is the process of mapping any arbitrary domain (called an alias) to load a site. If an alias of `arbitrarydomain.com` is set for the site `network.com/subsite`, the site and wp-admin interface can be accessed over either the alias or the original URL.

Internally, Mercator looks at a request's domain and informs WordPress [what set of tables to use](https://www.youtube.com/watch?t=249&v=3evwb1SiaBY#t=5m42s). User authentication cookies are set for all domains in the network, so a user logs in on one site and is authenticated across all.

Installation
------------

[](#installation)

Mercator must be loaded during sunrise.

We recommend dropping Mercator's directory into your `mu-plugins` directory. You may need to rename the folder from `Mercator-master` to `mercator`.

Then create a `wp-content/sunrise.php` file with the following:

```
