Skip to content

Installing Multi-tenancy

The Multi-tenancy plugin cannot be installed directly from the Moodle plugins database because it requires a core Moodle patch. Installation must be done via Git.

The branch names and plugin paths depend on your Moodle version:

Moodle versionMoodle branchpatch branchtool_mutenancytool_mulib
4.5.xMOODLE_405_STABLEpatch/mutenancy/MOODLE_405_STABLEMOODLE_405_STABLEadmin/tool/mutenancyMOODLE_405_STABLEadmin/tool/mulib
5.0.xMOODLE_500_STABLEpatch/mutenancy/MOODLE_500_STABLEMOODLE_500_STABLEadmin/tool/mutenancyMOODLE_500_STABLEadmin/tool/mulib
5.1.xMOODLE_501_STABLEpatch/mutenancy/MOODLE_501_STABLEMOODLE_501_STABLEpublic/admin/tool/mutenancyMOODLE_500_STABLEpublic/admin/tool/mulib

The following commands use Moodle 4.5.x as an example. Adjust branch names and paths according to the table above for other versions.

  1. Clone Moodle:
Terminal window
git clone -b MOODLE_405_STABLE https://github.com/moodle/moodle.git
cd moodle
  1. Apply the Multi-tenancy core patch:
Terminal window
git remote add patches https://github.com/mutms/patches.git
git fetch patches
git merge patches/patch/mutenancy/MOODLE_405_STABLE
  1. Clone the MuTMS library plugin:
Terminal window
git clone -b MOODLE_405_STABLE https://github.com/mutms/moodle-tool_mulib.git admin/tool/mulib
  1. Clone the Multi-tenancy plugin:
Terminal window
git clone -b MOODLE_405_STABLE https://github.com/mutms/moodle-tool_mutenancy.git admin/tool/mutenancy
  1. Continue with the standard Moodle installation.