You may need to move your data across sites or within your Matomo. Here we describe the different methods to move data across installations. An idsite is an individual website within your Matomo. From here on in we use the terminology idsite when referring to an individual website.

Moving idsites between locally hosted Matomo instances
Moving idsites between Cloud hosted instance
Moving idsites from a locally hosted Matomo to a Cloud hosted Matomo
Moving idsites from Cloud hosted Matomo to self hosted Matomo
Moving a locally hosted Matomo to a newly installed locally hosted Matomo
Moving a locally hosted Matomo to the Cloud
Moving a Cloud database to a locally hosted Matomo
Merging multiple idsites into 1
Merging cloud accounts

Moving idsites between locally hosted Matomo instances

There is no database query available that would allow you to export just the data from one site to be imported into another instance. To move the idsite to another self hosted Matomo please see our guide here

Moving idsites between Cloud hosted instance

You would use this process if you had a customer that wanted to manage their own Cloud account. Please create another trial here and purchase a plan. Then ask our Cloud support to have the database copied to the new instance. The entire database will be copied and then you should login and delete all the sites you no longer require before handing it over to the new owner.

Moving idsites from a self hosted Matomo to a Cloud hosted Matomo

It is not possible to move a single idsite to the cloud. We would need to import your entire database and then you would need to login to the cloud account and delete the unwanted sites. It is also not possible to import a single idsite to merge with a current cloud installation.

Moving idsites from Cloud hosted Matomo to self hosted Matomo

We can export a Cloud database for any paid Cloud plan. You would then install the database dump in a new Matomo installation then use the method here to move the idsite to your locally hosted Matomo.

Moving a locally hosted Matomo to a newly installed locally hosted Matomo

This is covered in our guide here

Moving a locally hosted Matomo to the cloud

We would be happy to move your locally hosted Matomo to the cloud free of charge for any paid plan. Please read and complete our migration form here. We can not migrate to trials.

Moving a Cloud database to a locally hosted Matomo

We can supply a database dump of your cloud installation at anytime for a paid plan. Just contact our cloud support team to gather your database dump. Dumps are not available for trials.

Merging multiple idsites into 1

There might be occasions where you may have set the wrong idsite when tracking a site or you want to move tracking data from two idsites into one. It is not possible to move data between idites or merge the data. The only process available to copy the data from one idsite to another would be to replay the logs using log analytics. This process involves importing the access logs from your web server and replay these to your Matomo installation and correct idsite.

When the wrong idsite is used

If you have tracked to the wrong site and would like to import the logs to the correct site there is an extra step to perform prior to importing. The log data will look like below

 12.10.30.51 - - [03/Feb/2020:16:40:31 +1300] "GET /matomo.php?idsite=1&rec=1&urlref=https://www...................... HTTP/1.1" 200 256 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"

You will notice the log includes idsite=1. You will need to use your favourite text editor to search and replace idsite=1 with the correct idsite for example idsite=3 then start the process of importing.

Merging cloud accounts

Technically it is not possible to merge data across subdomains for example idsite 1 example1.matomo.cloud -> idsite x example2.matomo.cloud. The best solution would be to import your access logs into a new idsite in your target cloud account by replaying the logs using log analytics.

Previous FAQ: Migrate from Google Analytics to Matomo: Import GA data