How to solve the error message “Your PHP CLI version is not compatible with the Matomo requirements”
You may have in your system report (available from the menu Matomo Analytics > Diagnostics
) an error message displayed telling you that your PHP CLI is not compatible with Matomo.
First, you should check with your hosting provider if, indeed, your PHP CLI version is 7.2.5 or above. But if you did not get any error message after activating our plugin, the problem is probably elsewhere.
To manage different possible configurations, Matomo uses a custom way to detect which PHP CLI to use. Sometimes, hosting providers have their own way to manage the PHP CLI to use, and so Matomo does not detect the appropriate one.
To fix this problem,
– please edit the ./wp-content/uploads/matomo/config/config.ini.php
file.
– in this file, you have a general section:
- Under this section, please add the following line:
php_binary_path="/usr/bin/php"
Where/usr/bin/php
is your PHP CLI path to use. If you don’t know which value to set here, please contact your hosting provider. Here is a sample email you can send to them:
Hello [Hosting Provider’s Name],
I hope this message finds you well. I am reaching out to seek some clarification and guidance regarding the PHP CLI (Command-Line Interface) path configuration on our hosting environment.
We would like to know the full path to the PHP CLI binary that should be used on our hosting server.
We understand that different hosting environments may have unique configurations, and we want to ensure that we are following the best practices to execute our PHP scripts efficiently and securely. Your guidance on this matter would be greatly appreciated.
Thank you,
- then, save the file
- please go now to the
Matomo Analytics > Diagnostics > Troubleshooting
menu. And press theFlush the Matomo cache
button.
When displaying your system report now (menu Matomo Analytics > Diagnostics
), you should see now this new value next to the PHP Found Binary
value and this error message should have disappeared.