PHPackages                             gwa/multisite-directory-resolver - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gwa/multisite-directory-resolver

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gwa/multisite-directory-resolver
================================

Adds filters that correct directory paths in a Wordpress multisite install with the WordPress installation in a custom subfolder.

v2.2.0(10y ago)421.4k[1 issues](https://github.com/gwa/WpMultisiteDirectoryResolver/issues)1MITPHPPHP &gt;=5.4.0

Since May 5Pushed 9y ago3 watchersCompare

[ Source](https://github.com/gwa/WpMultisiteDirectoryResolver)[ Packagist](https://packagist.org/packages/gwa/multisite-directory-resolver)[ Docs](https://github.com/gwa/WpMultisiteDirectoryResolver)[ RSS](/packages/gwa-multisite-directory-resolver/feed)WikiDiscussions 2.2 Synced 1mo ago

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

MultisiteDirectoryResolver
--------------------------

[](#multisitedirectoryresolver)

Adds filters that correct directory paths in a Wordpress multisite install with the WordPress installation in a custom subfolder.

Master
------

[](#master)

[![Quality Score](https://camo.githubusercontent.com/e24dda3fc71a5fcf9a906be62b2a2e0c3a2f1a7cf7dd22ae42beaf5e2364c1f3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6777612f57704d756c7469736974654469726563746f72795265736f6c7665722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gwa/WpMultisiteDirectoryResolver/code-structure/master)[![Build Status](https://camo.githubusercontent.com/d7db4d1c9abcce59c8307a8df1d2b160653dede74365f7bbe37f6154ecd12b94/68747470733a2f2f6170692e7472617669732d63692e6f72672f6777612f57704d756c7469736974654469726563746f72795265736f6c7665722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/gwa/WpMultisiteDirectoryResolver)

Develop
-------

[](#develop)

[![Quality Score](https://camo.githubusercontent.com/e24dda3fc71a5fcf9a906be62b2a2e0c3a2f1a7cf7dd22ae42beaf5e2364c1f3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6777612f57704d756c7469736974654469726563746f72795265736f6c7665722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gwa/WpMultisiteDirectoryResolver/code-structure/master)[![Build Status](https://camo.githubusercontent.com/d7db4d1c9abcce59c8307a8df1d2b160653dede74365f7bbe37f6154ecd12b94/68747470733a2f2f6170692e7472617669732d63692e6f72672f6777612f57704d756c7469736974654469726563746f72795265736f6c7665722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/gwa/WpMultisiteDirectoryResolver)

Usage
-----

[](#usage)

### Requirements

[](#requirements)

PHP 5.4.0 or above

### Installation

[](#installation)

Install through composer.

```
composer require gwa/multisite-directory-resolver

```

### How to use

[](#how-to-use)

```
// project root: path/to/project
// wp install:   path/to/project/custom/install/path

// choose which resolver you like to use
// 1. MultisiteResolverManager::TYPE_FOLDER - Use only for sub folder url handling -> example.com/site1/../..
// 2. MultisiteResolverManager::TYPE_SUBDOMAIN - Use only for sub domain handling -> test.example.com

$mdr = new Gwa\Wordpress\MultisiteDirectoryResolver('custom/install/path', $resolver);
$mdr->init();
```

Set you cookie like this to resolve the wordpress multisite redirect Loop.

```
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);
define('ADMIN_COOKIE_PATH', '/');
```

Contributing
------------

[](#contributing)

All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send us a pull request.

To ensure a consistent code base, you should make sure the code follows the [Coding Standards](http://symfony.com/doc/current/contributing/code/standards.html)which we borrowed from Symfony.

The easiest way to do make sure you're following the coding standard is to run `vendor/bin/php-cs-fixer fix` before committing.

If you would like to help take a look at the [list of issues](https://github.com/gwa/WpMultisiteDirectoryResolver/issues).

Authors
-------

[](#authors)

Great White Ark -  -

### License

[](#license)

Open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~66 days

Total

13

Last Release

3605d ago

Major Versions

v0.0.9 → v2.0.02015-07-23

v1.0.0 → v2.1.02015-10-14

1.0.x-dev → 2.2.x-dev2016-07-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff4c484be9fc46201a1c3c13fc961525d699d1c4e7dda68df7c5b408f147228a?d=identicon)[gwa](/maintainers/gwa)

---

Top Contributors

[![prisis](https://avatars.githubusercontent.com/u/2716058?v=4)](https://github.com/prisis "prisis (30 commits)")[![gwagroves](https://avatars.githubusercontent.com/u/8222012?v=4)](https://github.com/gwagroves "gwagroves (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

composerwordpressmultisite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gwa-multisite-directory-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/gwa-multisite-directory-resolver/health.svg)](https://phpackages.com/packages/gwa-multisite-directory-resolver)
```

###  Alternatives

[justcoded/wordpress-theme-boilerplate

WordPress theme boilerplate with better code structure and OOP support.

563.9k1](/packages/justcoded-wordpress-theme-boilerplate)[wordpress/skeleton

Composer based WordPress project skeleton.

461.7k](/packages/wordpress-skeleton)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
