Since the 3.12 release, there is an incompatibility between the WP-Rocket and Matomo plugins: They embed different Monolog versions, which leads to errors in Matomo.

This is a recurring problem in the WordPress plugins: each plugin embeds its own dependencies, how we can be sure that there are no conflicts between these versions?

This is a well known problem, and we have open issues for this:
* https://github.com/matomo-org/matomo-for-wordpress/issues/233
* https://github.com/matomo-org/matomo/issues/16905

This is a huge update and there is a lot of work to do to fix these issues. We plan for now to release a fix for these issues in the Matomo 5.0.0 so far.
Since then, there are no other solutions than downgrade your plugin versions to ensure compatibility with our Matomo plugin.
Here’s how you can downgrade your WP-Rocket version to a compatible one.

Download the 3.11.5 WP-Rocket version

WP-Rocket upgraded its Monolog requirement version in the 3.12 version.
We need to download the previous release, which is the 3.11.5. See the Changelog for more information.
We’ll do that by adding the WP_ROCKET_LASTVERSION constant

  1. open your wp-config.php file
  2. add the following content in this file:
    if (!defined('WP_ROCKET_LASTVERSION')) {
    define( 'WP_ROCKET_LASTVERSION', '3.11.5' );
    }

* open Your WP-Rocket configuration panel at https://mywebsite/wp-admin/options-general.php?page=wprocket#tools. (Replace mywebsite by your server URL).
* In the tools part, select Rollback > Reinstall version 3.11.5.
Screenshot from 2022-09-06 11-04-41
* You should get a similar page
Screenshot from 2022-09-06 12-08-40
That’s it! You have a WP-Rocket compatible version with the Matomo plugin. We’ll do our best to find a quick solution to be able to support the more recent releases of this plugin.

Conclusion

We expect to fix this problem in the next major Matomo release, which should be published in the upcoming months.
When it’ll be fixed, you’ll have to remove the constant set in the wp-config.php file.

Previous FAQ: Resolving archiving errors with Matomo for WordPress on Uberspace Hosting