PHPackages                             bellcom/os2subsites\_provision - 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. bellcom/os2subsites\_provision

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

bellcom/os2subsites\_provision
==============================

Server scripts solution to manage Drupal multisite.

1.0.3(2y ago)0400MITPHP

Since Feb 23Pushed 4mo ago10 watchersCompare

[ Source](https://github.com/bellcom/os2subsite_provision)[ Packagist](https://packagist.org/packages/bellcom/os2subsites_provision)[ RSS](/packages/bellcom-os2subsites-provision/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (11)Used By (0)

Drupal multisite server provision scripts set.
==============================================

[](#drupal-multisite-server-provision-scripts-set)

Requirements.
-------------

[](#requirements)

- Drupal 7,8
- Apache web server

NOTE: This solution doesn't work with NGINX web server.

Download and install.
---------------------

[](#download-and-install)

Composer is recommended way to get files in your drupal project. Just use command `composer require bellcom/os2subsites_provision`.

### Composer specific settings.

[](#composer-specific-settings)

For composer based stack you will need to add specific settings to composer.json file.

#### 1. Override default installed path for composer installer.

[](#1-override-default-installed-path-for-composer-installer)

By default `bellcom/os2subsites_provision` will be installed as `drupal-module`. Add extra line to your `composer.json` to override default path.

Add this line

```
"scripts/os2subsites_provision": ["bellcom/os2subsites_provision"],

```

above line define path for drupal modules

```
    "extra": {
        ...
        "installer-paths": {
            ...
            "scripts/os2subsites_provision": ["bellcom/os2subsites_provision"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            ...
        }
        ...
    }

```

#### 2. Check local and config files.

[](#2-check-local-and-config-files)

Composer will keep os2subsite\_provision code base updated and stable. It means that all extra files will be removed from os2subsites\_provision directory, includes config and local files. To add files back after every composer install/update add following command to composer.json `scripts` section.

```
    "scripts": {
        ...
        "post-install-cmd": [
             ...
            "./scripts/os2subsites_provision/check_config.sh scripts/os2subsites_provision_config"
             ...
        ],
        "post-update-cmd": [
             ...
            "./scripts/os2subsites_provision/check_config.sh scripts/os2subsites_provision_config"
             ...
        ]
    },

```

To manage subsites there are drupal module that triggering server scripts. See how to add module below.

### Allow web server run os2subsites\_provision scripts.

[](#allow-web-server-run-os2subsites_provision-scripts)

To allow web server run scripts that will handle subsites you need to allow apache user run this scripts with `sudo` rights without password. To allow Apache user `www-data` run os2subsites scripts add following line to `/etc/sudoers.d/os2subiste_provision` file.

```
www-data   ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_add_domain.sh
www-data   ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_create.sh
www-data   ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_delete.sh
www-data   ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_remove_domain.sh
www-data   ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/reload.sh

```

Restart web server after adding to apply changes.

Check article [How to run sudo command without a password](https://www.cyberciti.biz/faq/linux-unix-running-sudo-command-without-a-password/)if you need more info or just google it.

Drupal 8 module.
----------------

[](#drupal-8-module)

To add module to your Drupal 8 installation create symlink to proper 8.x module as you can see in example. It assumes that you have `web` as drupal root folder and `scripts/os2subsites_provision` as folder with os2subsites scripts.

```
mkdir -p ./web/modules/custom
cd ./web/modules/custom
ln -s ../../../scripts/os2subsites_provision/8.x/bc_subsites

```

See module [README.md](https://github.com/bellcom/os2subsite_provision/blob/develop/8.x/bc_subsites/README.md) file

Drupal 7 module.
----------------

[](#drupal-7-module)

To add module to your Drupal 7 installation create symlink to proper 7.x module as you can see in example. It assumes that you have `docroot` as drupal root folder and `scripts/os2subsites_provision` as folder with os2subsite\_provision scripts.

```
mkdir -p ./web/sites/all/modules/custom
cd ./web/sites/all/modules/custom
ln -s ../../../../../scripts/os2subsites_provision/7.x/bc_subsites

```

See module [README.md](https://github.com/bellcom/os2subsite_provision/blob/develop/7.x/bc_subsites/README.md) file

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance54

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.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 ~281 days

Total

5

Last Release

775d ago

Major Versions

1.0.3 → 20240324.x-dev2024-03-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/827308?v=4)[Jørn Skifter Andersen](/maintainers/skifter)[@skifter](https://github.com/skifter)

![](https://www.gravatar.com/avatar/62f8489b69aecc84322f8899d288c3ab41d3022532d49c849ae4ca10e20f4df7?d=identicon)[andriyun](/maintainers/andriyun)

![](https://www.gravatar.com/avatar/134c42b216718e3d28298bcec8772eeb309c8c94afff3462dac1245b06c06cc5?d=identicon)[stanbellcom](/maintainers/stanbellcom)

---

Top Contributors

[![andriyun](https://avatars.githubusercontent.com/u/5544994?v=4)](https://github.com/andriyun "andriyun (57 commits)")[![inuitviking](https://avatars.githubusercontent.com/u/11981709?v=4)](https://github.com/inuitviking "inuitviking (2 commits)")[![stankut](https://avatars.githubusercontent.com/u/1537807?v=4)](https://github.com/stankut "stankut (2 commits)")[![skifter](https://avatars.githubusercontent.com/u/827308?v=4)](https://github.com/skifter "skifter (1 commits)")

### Embed Badge

![Health badge](/badges/bellcom-os2subsites-provision/health.svg)

```
[![Health](https://phpackages.com/badges/bellcom-os2subsites-provision/health.svg)](https://phpackages.com/packages/bellcom-os2subsites-provision)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

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