Skip to content

Advanced Git installation

This page covers installing Multi-tenancy via Git. This is intended for administrators comfortable with the command line, Git, and web server configuration. For new sites on Moodle 5.1.x, the Composer seed is recommended instead.

The branch names and plugin paths depend on 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

Note that there might be git merge conflicts if you merge the multi-tenancy patch into unreleased upstream MOODLE_XXX_STABLE branches. If that happens you may try the patch/mutenancy/MOODLE_XXX_STABLE_NEXT branch instead.

Terminal window
git clone -b mutenancy-4.5.10-02 https://github.com/mutms/patches.git moodle
cd moodle
git clone -b v4.5.10.06 https://github.com/mutms/moodle-tool_mulib.git admin/tool/mulib
git clone -b v4.5.10.06 https://github.com/mutms/moodle-tool_mutenancy.git admin/tool/mutenancy

After cloning, continue with the standard Moodle 4.5 installation.

Terminal window
git clone -b mutenancy-5.0.6-02 https://github.com/mutms/patches.git moodle
cd moodle
git clone -b v5.0.6.06 https://github.com/mutms/moodle-tool_mulib.git admin/tool/mulib
git clone -b v5.0.6.06 https://github.com/mutms/moodle-tool_mutenancy.git admin/tool/mutenancy

After cloning, continue with the standard Moodle 5.0 installation.

Terminal window
git clone -b mutenancy-5.1.3-02 https://github.com/mutms/patches.git moodle
cd moodle
git clone -b v5.0.6.06 https://github.com/mutms/moodle-tool_mulib.git public/admin/tool/mulib
git clone -b v5.1.3.06 https://github.com/mutms/moodle-tool_mutenancy.git public/admin/tool/mutenancy

After cloning, continue with the standard Moodle 5.1 installation.