How to activate a new plugin in multi servers environment?
Auto-hébergement
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.phpfile will be synchronised (or synchronise it manually) to all your Matomo app servers
To activate a new plugin, follow these steps:
- On one application server, run:
php console plugin:activate TheNewPluginName. It will apply any database schema changes and writes to theconfig.ini.php(by adding toPluginsInstalled[]andPlugins[]). - Sync
config/config.ini.phpto all servers (if not shared). - Run the activation command on the other app servers as well:
php console plugin:activate TheNewPluginName. This rebuilds node-local tracker assets (for example, updates tomatomo.js) and it does not reapply schema changes.
Matomo bundles core tracker code plus any plugin tracker code (e.g., a plugin’s tracker.js/tracker.min.js) into a single matomo.js on the server that runs the activation. This is why you need to activate the plugin on every application server (or use a shared assets cache), so each node refreshes its local tracker bundle.
Next FAQ: How do I disable a plugin?
Previous FAQ: How do I install a new Theme?