How to install and configure Matomo in your website

How to install and configure Matomo in your website

Published at: 02/01/2023
Updated at: 02/27/2023

Setting up Matomo for tracking visits

Matomo is an open source software that we can install on our server or use in the Cloud version. One of the main advantages is that we can have total control over the data collected, thus guaranteeing more privacy for our visitors.

Let's see why the On-Premise solution is the recommended choice, and how to configure it.

Hosting service

To install Matomo it is recommended to have a dedicated server or at least a virtual machine, according to your needs. We can also install it on a shared server, for example the same one where we have the website we want to monitor, but it also depends on how much traffic we get.

If we want to get a rough idea of how many users visit our website, hosting services often already include some raw statistics, for example via Awstats.

If you need someone to help you in these choices or who can install Matomo for you, contact me. I turn into a freelance web developer at night and take care of that too.

Let's quickly see the difference between dedicated server and virtual machine.

Remember that whatever choice we make we will need to respect the minimum requirements of Matomo and therefore have available on our server:

  • PHP
  • MySQL
  • A webserver like Apache, Nginx or similar

In the dedicated server or virtual machine we will have to install, or have already installed, all these services. Clearly we can use the same machine to install something else, for example email servers, applications of various types such as Laravel, NodeJS or CodeIgniter, but this is a separate choice.

It can be useful to have root permissions, but not essential. However, we can also install Matomo in a shared environment, for example through panels such as cPanel, or from the command line.

Dedicated server

Generally the dedicated server is more expensive but also more performing. It is the ideal choice for large installations, to monitor the traffic of websites that receive thousands of views every day. Such a large number of accesses means many queries executed against Matomo's MySQL database.

As a guideline, a server with at least 8GB of RAM, 4-Core CPU and 100GB of disk space should be more than enough for large installations. In case of much higher traffic, it will be advisable to adjust the hardware accordingly. You could also opt for more scalable solutions that allow you to increase and decrease the hardware characteristics in a flexible way.

Let's remember that if we also keep the website on the same server, perhaps with its separate database, we may need more resources to make both installations work well together.

Are you considering purchasing a hosting? Take a look at the services of our partner Keliweb: Cloud Hosting H2, KeliTOP, VPS Enterprise

Alternatively, let's consider using a virtual machine.

Virtual machine

Virtual Machines are often cheaper than a dedicated server, while still offering a complete service, even with root access. They may also be suitable for those who have a website on a cheap and shared hosting service.

A Virtual Machine is like a small dedicated server. It is ideal for small to medium installations. It can also be fine for large installations, but the cost may not be worth the candle: at that point a dedicated server may be worthwhile.

For small installations, below 100 visits per day, 1 vCore with 1GB of RAM and 20GB of disk space should be sufficient.

An average installation, between 100 and 250 visits per day, could require at least 2 vCores and 2GB of RAM.

Do you need a Virtual Machine? Take a look at the services of our partner Keliweb: VPS Prime, VPS Essentials, VPS Value

It is advisable to evaluate whether you plan to grow traffic in a short time: in this case it is better to already take a more powerful Virtual Machine.


There is a Matomo plugin for Wordpress available. Since Wordpress already works with MySQL, it is generally not necessary to configure a separate server, although it is still the recommended choice, because it is better to keep the Wordpress database separate from that of Matomo.

The plugin is simple to install and the interface we will have access to will be very similar to that of Matomo on-premise. We will only need a Wordpress administrator account. If desired, we can then install a Wordpress plugin also for managing user roles, and thus assign other users permissions to access Matomo.

In fact, Matomo provides different user roles and configurable permissions on Wordpress.

Are you looking for a hosting service for Wordpress? Check out Keliweb's Play, Premium and Corporate plans!


Installing Matomo is simple: we download Matomo On-Premise and upload the files to our website. If we use Filezilla we will have to load the already unpacked folder, while if we have a file manager available we can load the ZIP and extract it, for example with cPanel, saving some time.

We can also configure a subdomain, such as, in which to keep our installation.

Now let's go to the web address where we installed Matomo and we will see the configuration page:

First step of the Matomo installation
First step of the Matomo installation

We verify that the system requirements are met and proceed to enter the database data:

Third step: database configuration
Third step: database configuration

Matomo will create the tables in the database. In case of problems, we verify that the connection to the database is functional and that the entered data is correct.

Now we will have to create the Super User to use as administrator:

Fifth step: Configuring the Super User
Fifth step: Configuring the Super User

Finally we configure the website we want to monitor. Later we can add other users and monitor other websites.

Sixth step: Configuring the website
Sixth step: Configuring the website

With this we are finished. Now we just need to add the Javascript tracking code, or use server-side tracking. For greater precision we can use both: Javascript tracking is useful for determining the duration of the user's session.

Server Side Tracking

Con Matomo possiamo tracciare facilmente il traffico lato server grazie al PHP Tracker. Richiede delle conoscenze tecniche ma è ideale per avere un'analisi del traffico più precisa, rispettando comunque la riservatezza dei nostri utenti.

With Matomo we can easily track server-side traffic thanks to the PHP Tracker. It requires technical knowledge but is ideal for having a more precise traffic analysis, while still respecting the privacy of our users.

Matomo's dashboard

If everything went well, we will have the dashboard of our Matomo in front of us, similar to this:

Matomo's dashboard
Matomo's dashboard

From here we will have access to various sections such as behavior, acquisition and objectives. We can also install various plugins to increase functionality.

Leave a comment below to let me know what you think, or to share any difficulties you encountered setting up or installing.

Don't miss the next articles! Follow me on Facebook and Youtube! You can also make a donation!

Leave a comment

All comments will be subject to approval after being sent. They might be published after several hours.

You can just use a random nickname, it is usefull to allow me to at least answer your comments. And if you choose to submit your email, you can receive a notification whenever I reply to your comment.

No comments have been written so far on this article. Be the first to share your thoughts!