PHPackages                             rdcstarr/laravel-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. [Framework](/categories/framework)
4. /
5. rdcstarr/laravel-multisite

ActiveLibrary[Framework](/categories/framework)

rdcstarr/laravel-multisite
==========================

A multisite package for Laravel.

v1.1.1(5mo ago)013MITPHPPHP ^8.0

Since Sep 17Pushed 5mo agoCompare

[ Source](https://github.com/rdcstarr/laravel-multisite)[ Packagist](https://packagist.org/packages/rdcstarr/laravel-multisite)[ Docs](https://github.com/rdcstarr/laravel-multisite)[ RSS](/packages/rdcstarr-laravel-multisite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (12)Used By (0)

Laravel Multisite
=================

[](#laravel-multisite)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d6066ef54326d96d05f867f586cc56711615942777cd47821543c9e1558330de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72646373746172722f6c61726176656c2d6d756c7469736974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdcstarr/laravel-multisite)[![GitHub Tests Action Status](https://camo.githubusercontent.com/46fa24a2af9228562c71285aa74e66d7bc680009d1121a04335bd0c8ad105f8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72646373746172722f6c61726176656c2d6d756c7469736974652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rdcstarr/laravel-multisite/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/81bdd6eb3508d4e5c517cbf454ef50ec19946cc607eaf623b99b555e9e4a3689/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72646373746172722f6c61726176656c2d6d756c7469736974652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rdcstarr/laravel-multisite/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a21f5dde2ffede5471c2a2a0dc9ed2341dafcbaa1d987dc453f0174b2b8d88dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72646373746172722f6c61726176656c2d6d756c7469736974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdcstarr/laravel-multisite)

> A powerful and flexible Laravel package for multisite management, each site with different database and .env.

✨ Features
----------

[](#-features)

- 🧩 **Multisite** - Manage multiple sites with separate databases and configurations.

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require rdcstarr/laravel-multisite
```

1. Prepare your Nginx or Apache configuration to route requests to the same Laravel application. Example for nginx: ```
    server {
    	listen 80;
    	server_name example.com;

    	root /home/admin/web/{core.local}/public;

    	index index.php index.html index.htm;

    	location / {
    		try_files $uri $uri/ /index.php?$query_string;
    	}

    	location ~ \.php$ {
    		include snippets/fastcgi-php.conf;
    		fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
    		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    		include fastcgi_params;
    	}
    }
    ```
2. Replace `use Illuminate\Foundation\Application` with `use Rdcstarr\Multisite\Foundation\Application` in `./bootstrap/app.php`.
3. Add next cod before bootstrap application: ```
    $_SERVER['MULTISITE'] = [
    	'production'      => [
    		'sites_path'  => '/home/admin/web', // path where all sites are located
    		'base_path'   => '/private',        // path to the folder with .env files, e.g. in my case path will be: `/home/admin/web/{site.tld}/private/.env`
    		'public_path' => '/public_html',    // path to the public files, e.g. in my case path will be: `/home/admin/web/{site.tld}/public_html`
    	],
    	'local'           => [
    		'sites_path'  => '/var/www/html/.subdomains', // path where all sites are located in local development
    		'base_path'   => '/private',                  // path to the folder with .env files, e.g. in my case path will be: `/var/www/html/.subdomains/{site.tld}/private/.env`
    		'public_path' => '/public_html',             // path to the public files, e.g. in my case path will be: `/var/www/html/.subdomains/{site.tld}/public_html`
    	],
    	// List of artisan commands who doesn't require multisite context
    	'SKIP_VALIDATION' => [
    		'theme',
    	],
    ];
    ```

🛠️ Artisan Commands
-------------------

[](#️-artisan-commands)

The package provides dedicated Artisan commands for managing settings directly from the command line:

#### List sites

[](#list-sites)

```
php artisan multisite:list
```

#### Run migrations for all sites

[](#run-migrations-for-all-sites)

```
php artisan multisite:migrate [--force] [--seed] [--seeder]
```

#### Run migrations fresh for all sites

[](#run-migrations-fresh-for-all-sites)

```
php artisan multisite:migrate-fresh [--force] [--seed] [--seeder]
```

#### Queue worker for sites

[](#queue-worker-for-sites)

```
php artisan multisite:queue
```

#### Scheduler run for all sites

[](#scheduler-run-for-all-sites)

```
php artisan multisite:schedule-run
```

#### Seed database for all sites

[](#seed-database-for-all-sites)

```
php artisan multisite:seed [--force] [--class]
```

🧪 Testing
---------

[](#-testing)

```
composer test
```

📖 Resources
-----------

[](#-resources)

- [Changelog](CHANGELOG.md) for more information on what has changed recently. ✍️

👥 Credits
---------

[](#-credits)

- [Rdcstarr](https://github.com/rdcstarr) 🙌

📜 License
---------

[](#-license)

- [License](LICENSE.md) for more information. ⚖️

ToDo
----

[](#todo)

- \[\] Change single and daily logs to base path like `/home/admin/web/{site.tld}/private/logs/laravel.log`

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance75

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~7 days

Recently: every ~15 days

Total

11

Last Release

164d ago

### Community

Maintainers

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

---

Top Contributors

[![rdcstarr](https://avatars.githubusercontent.com/u/42062586?v=4)](https://github.com/rdcstarr "rdcstarr (16 commits)")

---

Tags

laravellaravel-multisiteRdcstarrmulltisite

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M223](/packages/laravel-horizon)[lunarstorm/laravel-ddd

A Laravel toolkit for Domain Driven Design patterns

17959.0k](/packages/lunarstorm-laravel-ddd)[bezhansalleh/filament-plugin-essentials

A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster

27584.7k16](/packages/bezhansalleh-filament-plugin-essentials)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[jonpurvis/squeaky

A Laravel Validation Rule to Help Catch Profanity.

706.0k](/packages/jonpurvis-squeaky)[blendbyte/filament-title-with-slug

TitleWithSlugInput - Easy Permalink Slugs for the FilamentPHP Form Builder (PHP / Laravel / Livewire)

1322.4k3](/packages/blendbyte-filament-title-with-slug)

PHPackages © 2026

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