How to activate a new plugin in multi servers environment?
When you run Matomo on multiple servers, you will need the following setup:
- Download the plugin from the Marketplace (or from https://plugins.matomo.org/download using your License key)
- Extract the plugin in the Matomo
plugins/
folder in your Matomo app codebase - Deploy the same Matomo app codebase to all servers
- Make sure the
config/config.ini.php
file will be synchronised (or synchronise it manually) to all your Matomo app servers
Then to activate a new plugin, follow these steps:
- On one server only, run the following console command in your Matomo directory:
php console plugin:activate TheNewPluginName
- Then wait until the plugin installation process completes successfully.
- (optional, only when NFS is not used) Manually synchronise the
config/config.ini.php
to all your Matomo app servers
Here is what happens during the plugin installation: If you install this new plugin for the first time on the one server, the plugin will install itself and may update the database schema (create tables, add new columns, etc.). It will then add the row PluginsInstalled[] = "TheNewPluginName"
in your config.ini.php
file to remember this plugin has been installed. It will then activate the plugin and add the row Plugins[] = "TheNewPluginName"
to your config.ini.php
file. Then your config.ini.php
file will be synchronised to all servers and the plugin will be activated across all servers.