Closed jcastillo-johngroup closed 2 months ago
Hi @jcastillo-johngroup the tmp path that Matomo for WordPress uses is actually different to PIWIK_INCLUDE_PATH . '/tmp'
. The code that's causing this error for you is more relevant for our core product.
If you replace the /path/to/wordpress/wp-content/plugins/matomo/config/config.php
file with https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/2c02169a25bc09d44813941ca601627be02e5687/config/config.php, it will disable the check and remove that specific warning. Note: this change will be included in future versions.
After installing the plugin, I saw a notification: There are some errors in the Matomo Diagnostics System report that may prevent the plugin for working normally.
On following the link to view reports, I find this PHP warning at the top of the page.
file_put_contents(/code/wp-content/plugins/matomo/app/tmp/empty): Failed to open stream: No such file or directory in /code/wp-content/plugins/matomo/app/plugins/Diagnostics/Diagnostic/RecommendedPrivateDirectories.php on line 22
I dug into the code and found this:
It looks like other code in the plugin are using
PIWIK_INCLUDE_PATH
. Is there a different recommendation to change thesetmp
file paths to somewhere else? Web host is Pantheon, who recommends to point all things that need "write" permission to the uploads directory. I know we can manually make changes to this file, but updating the plugin will always revert the changes. We want to avoid that too.System Report
Endpoints
Crons
Mandatory checks
Optional checks
Matomo Settings
Logs
WordPress
Server
PHP cli
Database
Browser