: Migrate Piwik Data I currently have Piwik installed on analytics.myhost.com with lots of data. This has been live for over a year so I would like to keep all of my stats. I have moved hosts
I currently have Piwik installed on analytics.myhost.com with lots of data. This has been live for over a year so I would like to keep all of my stats.
I have moved hosts now therefore also need to move my Piwik data. So far I have installed a new version on Piwik on mydomain.com/analytics This works as expected, no data so far, fresh new install, but working fine.
Can I move my old Piwik data to my new Piwik installation, if so - how? Is it just a matter of exporting my old Piwik DB and importing this to my new Piwik DB, overwriting old data?
Not sure if I should have imported the old DB first then ran the Piwik installer, or will it just pick up my new data if I overwrite what's there now.
More posts by @Heady270
2 Comments
Sorted by latest first Latest Oldest Best
The simplest way to migrate the data between two hosts would be with phpmyadmin.
On your old site login to phpmyadmin select the database on the left menu.
On the Export tab leave all the settings as they are and download the .sql file
Login to the new website through phpmyadmin (assuming you've created a db/user) click the database on the left menu and now import the .sql file.
Upload all your old Piwik files to the new server. Do this because if you've install the latest version of Piwik it may rely on an old database table no longer in your exported file. So work with all the same files from your old site.
Update the db, user, and pass for Piwiks db connection.
Adjust the tracking URL if needed unless it's the same.
With Piwik up and running again now you can go through the standard method to upgrade the software.
Here are two links from the manuals:
How can I reinstall Piwik? Can I keep the existing data?
How can I move Piwik from one server to another, also migrating the data from one mysql server to another?
I suspect that this should be enough unless you need help with MySQL:
How To Migrate a MySQL Database Between Two Servers
You can ignore the copy method used on this page and use FTP (text not binary) or any other copy method that you have available that preserves the text file.
If you have port 3306 access to your MySQL install(s), you can use MySQL Workbench which can be downloaded here:
Download MySQL Workbench
I strongly caution you to make several dumps of your database before trying to copy either using the command line of GUI. Sometimes, something will go wrong and not allow all of the data to be imported.
You can fine the Workbench documentation here:
MySQL Documentation: MySQL Workbench
This takes a bit to get started, but not much. I always recommend using the GUI if you can. The reason is simple. You do not have to know all the command line options, the GUI will often default to the options you need.
I hope that is enough to get you started. If you run into trouble, let us know and I can either update the answer, or anyone can help you in the comments or provide a new answer.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.