To use Piwik the recommended way is to download the latest stable version. It is not recommended to use Piwik directly from our Git repository for various reasons:
- The Piwik version from Git contains files that are only needed for development. Those files are not needed in production and could potentially cause harm, for example our test files.
- Some default settings are different which can cause Piwik to be slower. For example caches might be disabled by default.
Setting up deploying from Git
In case you want to use the very latest bleeding edge Piwik nonetheless and understand the risk, you may use Piwik directly from our Git repository. To deploy Piwik from Git, run the following commands once:
cd path/to/piwik # 1) Clone the Git repository git clone https://github.com/piwik/piwik.git . # 2) Optional step when you want to deploy a particular stable release (eg. 2.15.0) and not use bleeding edge git checkout 2.15.0 git submodule update --init --recursive # 3) Setup composer libraries curl -sS https://getcomposer.org/installer | php php composer.phar install --no-dev # 4) Now install Piwik via the web interface: https://piwik.org/docs/installation/ # 5) Disable Piwik development mode ./console development:disable
Deploying new versions from Git
Continuously deploying the bleeding edge code
To automatically deploy the latest bleeding edge code from our repository, setup a crontab or automated script with the following commands:
cd path/to/piwik # Pull the latest code from Piwik repositories php console git:pull # Upgrade the libraries in case there is any to be upgraded php composer.phar self-update > /dev/null php composer.phar install --no-dev > /dev/null # Run the upgrade in case there was one php console core:update --yes > /dev/null
(Note: we do not recommend to do this on production server, as the latest code from Git may be unstable at times and could cause data loss.)
Deploying a specific release
Alternatively, to deploy a particular Piwik release (in this example
2.15.0), run the following commands:
cd path/to/piwik git checkout 2.15.0 git submodule update --init --recursive php composer.phar install --no-dev