Alright! Let’s break it all down in a vivid, simplified setup guide for running Matomo Analytics

Alright! Let’s break it all down in a vivid, simplified setup guide for running Matomo Analytics with a:

:white_check_mark: VPS (Virtual Private Server)

:white_check_mark: cPanel

:white_check_mark: WordPress (either in a subdomain or subfolder)

:white_check_mark: Matomo in a way that you track all site activity (but keep full control of data)

PART 1: VPS + cPanel Prep Get a VPS with:

At least 1GB RAM

Apache or LiteSpeed

PHP 7.4+ or 8.x

MySQL/MariaDB

Install cPanel/WHM (you probably already have this).

cPanel makes life easier for managing domains, databases, and file uploads.

️ PART 2: Create a Subdomain or Subfolder for Matomo Choose ONE setup style:

OPTION A: Subdomain Example: analytics.yourdomain.com

Go to cPanel > Subdomains

Create analytics.yourdomain.com

It creates a new folder: /public_html/analytics

OPTION B: Subfolder Example: yourdomain.com/analytics

You already have a WordPress site in /public_html

Just create a folder inside it: /public_html/analytics

PART 3: Install Matomo

  1. Download Matomo Go to: Download Matomo Free Web Analytics Tool - #1 Open Source Analytics

Unzip and upload it into your chosen folder:

/public_html/analytics (subfolder)

OR /public_html/analytics.domain.com (subdomain)

You can use cPanel File Manager or FTP (FileZilla).

  1. Create a Database In cPanel > MySQL® Databases:

Create a new database: matomo_db

Create a new user: matomo_user

Assign the user to the database (ALL PRIVILEGES)

:gear: 3. Visit Matomo in Your Browser Go to:

analytics.yourdomain.com

or yourdomain.com/analytics

Matomo will launch the setup wizard:

Language: Choose your language

System check: Let it run

Database config: Use the DB info from above

Create super admin: Choose username, password, email

Setup site(s) to track

Done!

PART 4: Add Matomo Tracking to WordPress In WordPress:

:white_check_mark: Option 1: Use Plugin Install: Matomo Analytics – Ethical Stats. Powerful Insights.

Directly integrates Matomo with your site

No code needed

Works with your self-hosted Matomo instance (just paste your URL + site ID)

:white_check_mark: Option 2: Manual Code From Matomo dashboard > Admin > Websites > Tracking Code

Copy the JavaScript tracking code

Paste it in header.php of your WordPress theme (before ) OR

Use a plugin like “Insert Headers and Footers”

PART 5: Matomo SEO + Console Features (Optional) Install the Search Engine Keywords Performance plugin (from Matomo Marketplace):

Connect to your Google Search Console account

You’ll get keyword search reports and clicks/impressions like Search Console!

BONUS: Cookie-less Tracking & GDPR In Matomo:

Go to Privacy > Anonymize Data

Enable anonymizing IPs

Disable cookies (if you want):

Add window._paq.push([‘disableCookies’]); in the tracking code

This makes Matomo cookie-free and often no consent banner needed!

Result: Matomo live at: analytics.yourdomain.com or yourdomain.com/analytics

You track WordPress traffic with full privacy + ownership

You can analyze users, sessions, goals, events, campaigns, and more

No third-party Google tools involved at all