Matomo on-Premise : How to migrate config and DATA to new server (change of OS)?


We have Matomo 3.13 on premise and and need to change servers as we will use RHEL9.0 from nowadays and NOT centOS anymore.
So I have to migrate settings and DATA from one server to the next one.
Can I install the new server with Matomo 5.0 ?
Is there a procedure to follow for migrating configs and DATA and not losing anything ?

Hi @Renaud
Which version of PHP do you run?
I suggest you don’t do all migration a once, it will probably crash…
First, migrate to 4.0.0. Then 4.16.0. Then upgrade the server to RHEL9 (old Matomo versions are not fully compatible with PHP 8.1), and finally, maybe install Matomo 5.0. (Or wait the version is fully stable, when Matomo 5.1 will be released for example).
For data, if your DB server is dedicated for MySQL (and does not run Matomo itself), it does not need to be migrated at the same time (But I suggest you use MySQL 8+)…

Hi Philippe !
I think I may have explain my case badly.
We will make another server for our migration, as we no longer user CentOs.
The new server will be on RHEL9.0.
I may use Matomo 5.0 or the previous version, the matter is not important for the moment.

What I would like to know is How to migrate the configuration and the Data from one server to another, from the old server with Matomo 3.13 to the new server with a Matomo 4.xx or 5.0

I can switch it off for the necessary time to do so, if need be.

Hi @Renaud
Problems are following:

  • If you use a new OS version, then PHP version will be 8+, and there is some compatibility issues between Matomo 3.x and PHP 8+. Then you must upgrade Matomo version to at least 4.
  • If you upgrade, the database model (tables columns, indeses, etc.) must also be updated (the db model migration is included in the Matomo update process).
  • I recommend not update PHP + Matomo at the same time

If the database must also be moved from one server to another one, then I think you should move it at first step (if both servers can communicate to each other)…

So, If I understood you correctly :

  • systems must be on the same version or not too far
  • PHP is an issue, respect it
  • Database model is an issue : be careful
  1. update your old server as much as possible
  2. install the same version on the new server
  3. pray
  4. migrate (using the plugin: )

Right now, what I hae on the server :

  • PHP 7.3.10
  • Matomo 3.13
  • Can’t find DB version right now