Importing data from Piwik 1.11.1 to Matomo 3.3.0


I have an old Piwik 1.11.1 installed and being actively used by ~80 websites - although it contains old data on ~1,000 websites.
I would like to import all this data to a new machine with a clean installation of Matomo 3.3.3, while taking into consideration the fact that these ~80 sites are online and that I prefer minimal downtime and data loss.
I have the sites using the PHP tracking code (the Piwik URL is not exposed on the client side).

What are the steps I’ll need to take in order to import the data from the old Piwik installation to the new Matomo installation, and migrating the tracking codes on the relevant sites?

Thanks a lot!


I have no experience with Piwik <2 and large instances, so take this with a grain of salt:
I’d make a copy of the current instance and work on that one, so if something goes wrong it doesn’t affect your instance.
Then I wouldn’t make you update but at least make “stopovers” at 1.12, 2.x and 2.17 before going to 3.3.

So I guess I’ll have to live with some data loss, for the time between the “stopovers” until I’ll update all the websites to send the traffic to the new domain. Hmmm bummer but OK.

When you write “2.x” as one of the “stopovers” - can you refer me to a specific one? I just want to have my steps ready, instead of just guessing.

Where can I download older versions to make these “stopovers”? has all Piwik releases since 0.1.1.

Maybe do it once to try out if it works and then again with the latest data (and hopefully no interruptions)

I haven’t used Piwik before 2.10 so I just wrote that in case there was an problem in updating from 1.12 straight to the last (2.17)

Maybe someone from @innocraft has more experience with such complex updates?

I know that we got feedback from various people reporting that an update from 1.x to 3.x worked.
You could try to perform the update with a complete copy of code & db first to see if any problems occur.
Depending on the amount of data stored in the log tables such an update can take quite a long time

Definitely make a backup and then update, it should work. Before you start the update, disable the recording of tracking requests in the UI and later replay all requests using the log importer. You should barely if any downtime. You can tell the log importer exactly from what time to replay logs etc.

Thanks @thomas_matomo. The issue gets a bit tricky since I’m not only upgrading but also changing the server. Would you say I’d better upgrade, then move to the newer server?

Also, I tried copying the whole project from production (filesystem & database) to a local machine, but got an error:

preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
in ‘/var/www/html/piwik/libs/Smarty/Smarty_Compiler.class.php’ at the line 270

Due to the fact that the current shared hosting used for the Piwik 1.11.1 instance is running an old version of PHP… What’s your take on this?

Thanks again!

I don’t know which version you are using currently. If you are using older than PHP 5.5.9, then I would recommend to first update to PHP 5.5 which should be compatible with Piwik 1.11 (not tested but AFAIK). Then update to Matomo 3.3, then update to eg PHP 7.1.

I would not directly update to PHP 7.1 or something as Piwik 1.11 won’t work with it AFAIK. At the same time Matomo 3.3 won’t work with PHP versions older than PHP 5.5