Menu Close

Mautic multi tenant installation from one directory

Mautic has non documented way how to use the multiple Mautic installation from one resource. This tutorial is on your own risk.

Tutorial can help you:

  • manage multiple Mautic instance from one directory
  • run Mautic on subdomains (main.domain.tld, second.domain.tld, third.domain.tld)
  • each Mautic has own database
  • each Mautic use own themes directory
  • each Mautic use own plugins directory (optional)
  • each Mautic use own translations directory
  • each Mautic use own media directory
  • allow run crons for each Mautic installation
  • allow upgrade all instance with one command

Yes, it’s not real multi tenant feature, but it’s just workaround.
We will clone your Mautic to more separately installation, but just one directory with source code will be on demand.

Step 1

If you already using Mautic then you can skip this step.
But yes, this step is about installing Mautic.

Step 2

This step not required any changes. Just look to app/config/paths.php and see these lines:

//allow easy overrides of the above
if (file_exists(__DIR__.'/paths_local.php')) {
    include __DIR__.'/paths_local.php';

//allow easy overrides of the above
if (file_exists(__DIR__.’/paths_local.php’)) {
include __DIR__.’/paths_local.php’;

This is the most import part of the changes. Now we know that we can rewrite config parameters from in our own script.

Step 3

Create file app/config/paths_local.php

At the moment we are cooking of this blog post at the moment.
Signup for update