PHPackages                             harvyde/multisite - 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. harvyde/multisite

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

harvyde/multisite
=================

a library for detecting sites / hosts and environments. This library can be useful to build a multisite. Multiple domains pointing to the same application. You can use this class anywhere in your application to serve content based on domain and environment site be being accessed.

05PHP

Since Apr 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/harvyde/multisite)[ Packagist](https://packagist.org/packages/harvyde/multisite)[ RSS](/packages/harvyde-multisite/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

a library for detecting sites / hosts and environments. This library can be useful to build a multisite. Multiple domains pointing to the same application. You can use this class anywhere in your application to serve content based on domain and environment site be being accessed.

usage
=====

[](#usage)

```
    Multisite::setup(
      [
        'site1' => 'yourdomain.com',
        'site2' => 'anotherdomain.com',
      ]
    );

    # get current environment
    Multisite::env();

    # check environment
    Multisite::is_env('prod');
    Multisite::is_env(['prod', 'new']);
```

Support and Feedback
====================

[](#support-and-feedback)

If you find a bug, please submit the issue in Github directly. [harvyde/multisite](https://github.com/harvyde/multisite/issues) Issues

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/877e033794b805e0120c7d16c49fccf0d80481242828a3bd1607256b6d8d5a21?d=identicon)[harvyde](/maintainers/harvyde)

---

Top Contributors

[![harvyde](https://avatars.githubusercontent.com/u/6551190?v=4)](https://github.com/harvyde "harvyde (6 commits)")

### Embed Badge

![Health badge](/badges/harvyde-multisite/health.svg)

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

###  Alternatives

[troopers/ajax-bundle

Symfony AjaxBundle

2930.1k2](/packages/troopers-ajax-bundle)[smile/module-multi-coupon

Extension of Magento2 Sales Rule to allow multiple coupon usage.

102.9k](/packages/smile-module-multi-coupon)

PHPackages © 2026

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