Alright! Let’s break it all down in a vivid, simplified setup guide for running Matomo Analytics with a:
✅ VPS (Virtual Private Server)
✅ cPanel
✅ WordPress (either in a subdomain or subfolder)
✅ 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).
️ 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
PART 3: Install Matomo
1. Download Matomo
Go to: https://matomo.org/download
Unzip and upload it into your chosen folder:
You can use cPanel File Manager or FTP (FileZilla).
2. 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)
⚙️ 3. Visit Matomo in Your Browser
Go to:
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:
✅ Option 1: Use Plugin
Install: Matomo Analytics – Ethical Stats. Powerful Insights.
✅ 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 </head>
) 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):
BONUS: Cookie-less Tracking & GDPR
In Matomo:
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