Matomo upgrade 5.6.2 → 5.7.0 — Unable to write in the cache directory
Recently, I upgraded Matomo from 5.6.2 to 5.7.0. Right after the upgrade, I encountered an error — especially when trying to add users.
The issue
1
Error: Unable to write in the cache directory (/var/www/html/tmp/templates_c/16).
After logging out, the same error also appeared when attempting to log back into the instance.
Environment
- Matomo: 5.7.0 (upgraded from 5.6.2)
- Deployment: Docker container
- Stack: Apache / PHP (Docker image)
- JElastic Cloud (PaaS) on Infomaniak
Analysis
After a quick search, I found this Matomo forum thread: https://forum.matomo.org/t/unable-to-write-in-the-cache-directory-after-update-to-2-16-0/17979
This type of error is typically related to Matomo’s template cache.
Solution: clear the cache
Once inside the container, I ran:
1
rm -rf /var/www/html/tmp/templates_c/*
After clearing the cache, I could log in again without errors 😁.
A good reminder that after a version upgrade, the cache often deserves a quick cleanup.
This post is licensed under CC BY 4.0 by the author.