Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How To Install Piwik Analytics & Make It Work With WordPress

April 22, 2015

5 Min Read
Piwik WordPress
Reading Time: 5 minutes

If you are seeking an open source web analytics software, Piwik is the solution for you. Other popular web analytics software such as Google Analytics are hosted on servers beyond your control. Piwik, on the other hand, is hosted on your own server. Therefore, the data is tracked only internally within your database. You may even implement advanced queries to build highly detailed reports.

The visitors to your website can rest assured that their user data is not being forwarded to advertising companies, because of Piwik privacy policies. No matter which web analytics feature you require, Piwik has it with the added advantage of privacy. To top it all off, Piwik provides you mobile email and SMS report delivery!

Read our guide to installing Piwik software on your Cloudways hosted website. You’ll be pleasantly surprised by how easy it is.

As a result of its popularity amongst our clients and the community we interact with, we have received many requests to integrate Piwik into the Cloudways platform. But installing it yourself is easy and it takes less than 10 minutes to set it up.

How To Install Piwik Analytics

As said before, Piwik is easy to install and run. However, you need to check its compatibility with your server.

Before You Begin

Probably, you already have an account with us. If not then, you can sign up here and create an account on Cloudways. Once you are in, you need to launch a server with PHP stack.

Beginning Installation of Piwik

Minimum requirements as of writing of this article are:

  1. Webserver such as Apache, Nginx, IIS, etc.
  2. PHP version 5.3.3 or greater
  3. MySQL version 4.1 or greater
  4. (Enabled by default) PHP extension pdo and pdo_mysql, or the mysqli extension

The good news is that all the cloud servers launched on Cloudways support the minimum requirements of Piwik. So, let’s jump right into installing it.

Step 1: Setting up PHP stack & Downloading Piwik

If you haven’t launched a PHP stack, then you can launch it on any server that you have created. Navigate to “Server Management” tab and click “Add Application”. Then, select PHP stack and launch it. It will take a couple of minutes to set it up.





After it is ready, then navigate to “Application Management” tab and login to the SSH Terminal by using the provided login credentials.



Once you are logged in, run the command:

wget && unzip


That command will download the latest version of Piwik directly from the official Piwik directory and unzip it on your Cloudways PHP server.

Note: We recommend using SSH terminal for a fast and secure installation of Piwik on a Cloudways server. You can also use SFTP to manually upload the Piwik files to your servers, but that can take more time as SFTP is slower than SSH.

Step 2: Starting the 5-Minute Piwik Setup

After the download and extraction process is complete, navigate to your URL (like to begin the Piwik setup.

Initially, you will see a welcome screen that informs you about a simple 8-step process that will take around 5 minutes to complete.


Next, Piwik will run a system check on your Cloudways servers. Don’t worry, you will pass it with 100% marks. 🙂


In the third step, you will need to connect your Piwik software to a database. On Cloudways Platform after each application launch, you will get a new and separate database. You can find the database credentials inside “Access details” section of the “Application Management” tab. Just copy and paste the database username, password and database name to Piwik form fields and hit “Next”.


On step 4, you will be informed that Piwik has successfully created its entries on your database. Just hit next.


On step 5, you will be asked to create a Super User. This information will be used whenever you will need to login to your Piwik dashboard to view the stats. So, be sure to memorize these details.


In the next step, you will be asked the name and URL of your first website. Enter the required details and go to next step.


Piwik will then generate a unique tracking code for your website. Make sure to have this tracking code included on the pages that you want to track.


How to set up Piwik Analytics on your WordPress website

If you are running WordPress websites, then the easiest way to install the Piwik tracking code is to navigate to WordPress Admin -> Appearance -> Editor and then select footer.php. Insert the Piwik tracking code just before the closing </body> tag.


Save the WordPress file and then hit next on Piwik and you’re all set and ready to track those awesome visitors to your website.


After the installation is complete, you will be redirected to your Piwik login screen. Just insert the Super User credentials here to login to your dashboard.

Final Step

To make it easy, we will rename our PHP stack application in the Cloudways platform to something like Piwik Analytics. This way, you will find it easily by using the quick application search bar on the top navigation bar.

If you have any more questions regarding Piwik and its usage, then feel free to ask in the Comments section.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Start Growing with Cloudways Today!

We never compromise on performance, security, and support.

Ahsan Parwez

Ahsan is the Community Team Manager at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in any aspect he can. In his free time, you can find him playing RTS PC games.

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

BFCM 2019