If you are hosting a Piwik Web Analytics installation on your Linux server, than you may find it useful to automate the update using a bash script. While Piwik is capable of doing a web based update, we strongly believe in the principle of least privilege. Using this principle ensures tight security, however this comes at the expense of flexibility in terms of updates. Without further ado, below is our bash update script to update piwik from the command line.
cd /var/www cp -r piwik piwik.bkp wget https://builds.piwik.org/piwik.zip unzip -o piwik.zip cd piwik chown -R root:root /var/www/piwik chown -R www-data:root /var/www/piwik/tmp chown -R www-data:root /var/www/piwik/piwik.js chmod -R 0644 /var/www/piwik find /var/www/piwik/ -type d -exec chmod 755 {} \; php console core:update --yes cd .. ; rm piwik.zip "How to install Piwik.html"
Stay tuned for our upcoming article WordPress Update Using Linux CLI.