Skip to content

How to solve the error message "Your PHP CLI version is not compatible with the Matomo requirements"

mattmary edited this page May 19, 2023 · 2 revisions

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.

Screenshot from 2023-05-19 14-14-57

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:

Screenshot from 2023-05-19 14-21-56

  • 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.
  • then, save the file
  • please go now to the Matomo Analytics > Diagnostics > Troubleshooting menu. And press the Flush 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.