Required Configuration to Run Piwik

To run Piwik your host needs a couple of things:

  • Webserver such as Apache, Nginx, IIS, etc.
  • PHP version 5.3.3 or greater
  • MySQL version 4.1 or greater
  • (enabled by default) PHP extension pdo and pdo_mysql, or the mysqli extension.

Note that in May 2015 we will drop support for PHP 5.3 and Piwik will require PHP 5.4. Until then Piwik works well with any PHP >= 5.3.3.

We recommend using at least PHP 5.5 as it is much more memory efficient than previous PHP versions.

To make the most out of Piwik, you also need a few extra PHP extensions such as the PHP GD extension that is used to generate the sparklines (small graphs), graphs in statistics Email reports, as well as graphs in the Piwik Mobile App. The list of PHP extensions you are recommended to install are: php5-curl php5-gd php5-cli php5-geoip

For medium and high traffic websites, please see the following FAQ for more information: Piwik setup for high traffic websites

MySQL User requirements

When installing Piwik, you will need to specify a MySQL username and password. The MySQL user must have permission to create and alter tables in the database. You can create a new database and MySQL user with the command:

$ mysql -u adminusername -p
mysql> CREATE DATABASE piwik_db_name_here;
mysql> CREATE USER 'piwik'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON piwik_db_name_here.* TO 'piwik'@'localhost'

Replace piwik_db_name_here with the name of your MySQL database (if possible, this database should only have the Piwik tables installed).

The MySQL USER should have the permission to SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES.

If you do not have a server with PHP 5 enabled, we have partnered with high quality web hosts who provide a pre-installed Piwik for a small fee. See the Piwik Hosting page for more information.

Next step is to Install Piwik.