Softaculous

Self-hosted website analytics: install Matomo with Softaculous

Run privacy-friendly analytics on your own hosting: install Matomo with Softaculous, add the tracking code, set up archiving via cron and configure privacy options.

IntermediatecPanel hosting2 min read

Matomo (formerly Piwik) is an open-source alternative to Google Analytics that you host yourself. Visitor data stays on your hosting, which helps with privacy regulations, and you can even track without cookies. Softaculous installs it in a couple of minutes; a few settings afterwards keep it fast and compliant.

Before you start

  • A subdomain such as stats.example.com with a valid SSL certificate. See create a subdomain.
  • A supported PHP version with pdo_mysql, gd, mbstring and xml; memory_limit 256M or more.
  • Matomo suits small and medium sites on shared hosting. Very high-traffic sites generate a lot of data and are better on a VPS.

Install Matomo

  1. Open cPanel → Software → Softaculous Apps Installer, search Matomo (category Statistics) and click Install.
  2. Installation URL: https://, the stats subdomain, empty directory.
  3. Set the admin username, password and email, and the first website's name and URL.
  4. Click Install, then log in.

Add the tracking code

  1. In Matomo go to Administration (gear) → Websites → Tracking Code.
  2. Copy the JavaScript snippet and paste it before </head> on every page of your site.
  3. For WordPress, use the official Matomo integration plugin or a header-scripts plugin instead of editing theme files.
  4. Visit your site and check Visitors → Visits Log; your visit should appear within seconds.

Archive reports with cron

By default Matomo processes reports when someone opens the dashboard, which is slow. Use a cron job instead:

  1. In Administration → System → General settings, set Archive reports when viewed from the browser to No.
  2. Add a cPanel cron job every hour:
    /usr/local/bin/php /home/cpuser/stats.example.com/console core:archive --url=https://stats.example.com/ > /dev/null 2>&1

Use the PHP binary of the site's version; see cron troubleshooting.

Privacy settings

  • Administration → Privacy → Anonymize data: anonymise visitor IPs (2 bytes is common), and enable Delete old raw data after, for example, 180 days to keep the database small.
  • Respect Do Not Track: enable it under Privacy → Users opt-out.
  • Cookieless tracking: add _paq.push(['disableCookies']); to the tracking code before trackPageView. Check your local regulations on whether you still need consent.
  • Add the Matomo opt-out form to your privacy policy page.

Tip: Exclude your own visits under Websites → Manage → Excluded IPs using your IP from the IP checker.

Keep it healthy

  • Database size grows with traffic; check it in Manage My Databases and in Disk Usage.
  • Enable minor auto-upgrades and take a backup before major updates.
  • Ad blockers may block matomo.js; that is normal and affects any analytics tool.

Troubleshooting

  • No visits recorded: the tracking code is missing on the pages, or caching serves old HTML; purge your cache.
  • Dashboard very slow: browser archiving is still on, or the cron job fails.
  • Resource limit warnings: see resource usage.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.