wiki:Piwik

Version 1 (modified by chris, 3 years ago) (diff)

Page created and PiwikServer#Upgrades copied from ticket:4

The Piwik server at https://stats.crin.org/ was migrated from web2.crin.org to crin1.crin.org on ticket:4.

Upgrades

These are the steps you need to follow to upgrade Piwik on the server using the command line (it is also possible to update using the web interface but this is not recommended for sites with a lot of data).

Set Piwik not to record stats while we are upgrading:

sudo -i
cd /var/www
vi piwik/config/config.ini.php

Set this variable:

[Tracker]
record_statistics = 0

Download and verify the new version:

export PIWIK="2.13.0"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz.asc"
gpg --verify piwik-$PIWIK.tar.gz.asc

Backup the config file:

cp piwik/config/config.ini.php .

Extract the new version, set the ownerships, copy back the config file and run the updater:

tar -zxvf piwik-$PIWIK.tar.gz
cp config.ini.php piwik/config/
chown -R piwik:piwik /var/www/piwik/
php /var/www/piwik/console core:update

Then reset the config file to record stats:

vi piwik/config/config.ini.php

And check the status of the system check in the web interface at https://stats.crin.org/