Migrate websites, and all the tracking data between two Matomo (Piwik) installations.

This tool is useful in case you want to merge two Matomo installations, or if you want to move one or several websites to another Matomo server.


To migrate data from one Matomo server to another server, you must:

  • First make sure that both Matomo servers are using the latest Matomo version.
  • You must be able to connect to the Mysql server of the Target Matomo Server.
  • You must run the console command on the Matomo Server that data will be copied from.

Migrating the data

Start the migration by calling from the command line CLI the following command:

./console migration:site idSite --db-prefix piwik_

The command will ask for the credentials to the target database.

It will then migrate the data from the current Matomo to the target Matomo.


Run ./console migration:site --help to get a full list of options.

How do I migrate site data between two dates only?

You can use command options: --date-from and --date-to.

How do I migrate tracking log data only, and skip migrating archived data?

Just add the --skip-archive-data option.

How do I migrate the archived data and skip the tracking data?

Just add the --skip-log-data option.

Can I run the command on the Target Matomo (Piwik) server (where data will be imported)?

No, you must run the command from the source Matomo server (the server which contains the data you want to migrate).

  • Command

Download for Matomo On-Premise This plugin is not available for Matomo for WordPress

Please share