How to install Piwik Statistics System

Today I’m going to write about how to install Piwik Statistics System. This is an opensource web analytic, an alternative to Google analytic. A website for Piwik is

Firstly, I downloaded the zip file from the above website and unziped it.

Then I checked if my server has PDO installed by looking at php info. This can be done by creating an empty page with this code:




Another requirement is the GD image library. To enable this, open a terminal and type:

sudo apt-get install php5-gd


sudo /etc/init.d/apache restart

The next requirement is to have a memory of 128M. This can be done by editing the php.ini file under /etc/php5/apache2

sudo vi /etc/php5/apache2/php.init

Change memory limit to:

memory_limit = 128M

and restart the server with:

sudo /etc/apache2 restart

Copied piwik folder to the webserver directory.

Once that’s done, I went to http://localhost/piwik/ and followed the install instruction.

If it asked for chmod, it could mean that apache cannot write to this directory. There are 2 solutions to this problem.

1. To perform a change mode to 777, which allows everyone to be able to read, write and execute to that folder (possibly including subfolders.) !!!This is NOT recommended!!!

sudo chmod -R 777 /var/www/piwik

2. To change the owner of the folder to apache user. A default apache user is www-data. This is a lot better solution:

sudo chown -R www-data:www-data /var/www/piwik


2 Responses to How to install Piwik Statistics System

  1. haberler says:

    if you server a linux OS . Basicly you can type in ssh screen

    [$root] whereis php.ini

    generally its in the /etc/ directory
    nano /etc/php.ini

    you can change what you are needed now.

  2. mohammadthalif says:

    Thanks, Easy to use tutorial .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: