After having auto update enabled in WP, now I can access my installation only after deactivating Matomo. This happened on the update from latest v3 to v4.

This is the error message I get:

An error of type E_COMPILE_ERROR was caused in line 135 of the file /www/htdocs/w0158e93/project-newzealand.com/wp-content/plugins/matomo/app/vendor/php-di/php-di/src/Definition/Helper/CreateDefinitionHelper.php . Error message: Declaration of DI\Definition\Helper\CreateDefinitionHelper::getDefinition(string $entryName): DI\Definition\Definition must be compatible with DI\Definition\Helper\DefinitionHelper::getDefinition($entryName)

What to do?

Thanks, Julian


Which PHP version are you using?

The Version 4 of the plugin requires at least PHP 7.2.5

Same Here, php-version 7.4.13

Hi there,

any chance you could post your system report (it should be anonymised) see https://matomo.org/faq/wordpress/how-do-i-find-and-copy-the-system-report-in-matomo-for-wordpress/

It sounds like some incompatibility with some other plugin as we had to update our PHP DI library for PHP8 compatibility.

Hi everyone,
thanks for the replies.

PHP is running on 7.4 (that’s at least what the host shows me in admin panel).

I tried to run Matomo and access the system report. But all I get is the following message as soon as I activate Matomo in Safe Mode.

There has been a critical error on your website. Please check your site admin email inbox for instructions. Learn more about debugging in WordPress.

I am setting up a staging site and try to get the system report there.

Ok, here comes the report from the staging site.

I did clone my page, then deactivated ALL plugins.

This is what the report says now (didn’t even need to run safe mode now).


  • Matomo Plugin Version: 4.0.1
  • Config exists and is writable.: Yes ("$ABSPATH/wp-content/uploads/matomo/config/config.ini.php" )
  • JS Tracker exists and is writable.: Yes ("$ABSPATH/wp-content/uploads/matomo/matomo.js" )
  • Plugin directories: Yes ([{“pluginsPathAbsolute”:"$ABSPATH/wp-content/plugins/matomo/plugins",“webrootDirRelativeToMatomo”:"…/"}])
  • Tmp directory writable: Yes ($ABSPATH/wp-content/cache/matomo)
  • Matomo Version: 4.0.3
  • Matomo Blog idSite: 1
  • Matomo Install Version: 1.3.1 (Install date: 2020-11-05 11:51:57)
  • Upgrades outstanding: No
  • Upgrade in progress: No


  • Matomo JavaScript Tracker URL: ($site_url/wp-content/uploads/matomo/matomo.js)
  • Matomo JavaScript Tracker - WP Rest API: ($site_url/index.php?rest_route=/matomo/v1/hit/)
  • Matomo HTTP Tracking API: ($site_url/wp-content/plugins/matomo/app/matomo.php)
  • Matomo HTTP Tracking API - WP Rest API: ($site_url/index.php?rest_route=/matomo/v1/hit/)


  • Server time: 2020-12-01 23:34:23
  • Blog time: 2020-12-02 12:34:23 (Below dates are shown in blog timezone)
  • Sync users & sites: Next run: 2020-12-02 11:51:54 (-42 min 29s) ( Last started: 2020-12-01 11:54:06 (-1 days 0 hours). Last ended: 2020-12-01 11:54:06 (-1 days 0 hours). Interval: daily)
  • Archive: Next run: 2020-12-02 10:51:54 (-1 hours 42 min) ( Last started: 2020-12-01 11:54:06 (-1 days 0 hours). Last ended: 2020-12-01 11:54:08 (-1 days 0 hours). Interval: hourly)
  • Update GeoIP DB: Next run: 2020-12-05 11:51:54 (2 days 23 hours) ( Last started: 2020-11-05 11:52:58 (-27 days 0 hours). Last ended: 2020-11-05 11:52:59 (-27 days 0 hours). Interval: matomo_monthly)

Mandatory checks

  • PHP version >= : ok
  • PDO extension: ok
  • PDO\MYSQL extension: ok
  • MYSQLI extension: ok
  • Other required extensions: ok
  • Required functions: ok
  • Required PHP configuration (php.ini): ok
  • Directories with write access: ok
  • Directories with write access for Tag Manager: ok

Optional checks

  • Tracker status: ok
  • Memory limit: ok
  • Time zone: ok
  • Open URL: ok
  • PageSpeed disabled: ok
  • GD > 2.x + Freetype (graphics): ok
  • Other extensions: ok
  • Other functions: ok
  • Filesystem: ok
  • Warning Last Successful Archiving Completion: warning (Archiving last ran successfully on Monday, November 30, 2020 22:54:08 which is 1 days 00:40:14 ago )
  • Database abilities: ok
  • Max Packet Size: ok
  • Warning Geolocation: warning (The default location provider guesses a visitor’s country based on the language they use. This is not very accurate, so we recommend installing and using a geolocation database. )
  • Update over HTTPS: ok
  • Writable JavaScript Tracker ("/matomo.js"): ok
  • Supports Async Archiving: No
  • Warning Proxy header: HTTP_CF_CONNECTING_IP (A proxy header is set which means you maybe need to configure a proxy header in the Advanced settings to make location reporting work. If the location in your reports is detected correctly, you can ignore this warning. Learn more: https://matomo.org/faq/wordpress/how-do-i-fix-the-proxy-header-warning-in-the-matomo-for-wordpress-system-report/)
  • Had visit in last 5 days: Yes

Matomo Settings

  • Track mode: default
  • Track codeposition: footer
  • Track api endpoint: default
  • Track js endpoint: default
  • Version history: 4.0.1, 1.3.2, 1.3.1
  • Core version: 4.0.3
  • Last tracking settings update: 1604530816
  • Last settings update: 1604530936
  • Track search: Yes
  • Track 404: Yes
  • Disable cookies: Yes
  • Show get started page: 0


  • None:


  • Home URL: $site_url
  • Site URL: $site_url
  • WordPress Version: 5.5.3
  • Number of blogs: 1
  • Multisite Enabled: No
  • Network Enabled: No
  • WP_DEBUG: No
  • WP_CACHE: Yes
  • WPLANG: -
  • Permalink Structure: Default
  • Possibly uses symlink: No
  • Compatible content directory: Yes

WordPress Plugins

MU Plugins

  • WP STAGING Optimizer: 1.3


  • Ad Inserter: 2.6.18
  • Advanced Editor Tools (previously TinyMCE Advanced): 5.5.1
  • Antispam Bee: 2.9.3
  • Bloom: 1.3.11
  • Borlabs Cookie - Cookie Opt-in: 2.2.13
  • Classic Editor: 1.6
  • Contextual Related Posts: 2.9.4
  • Duplicator: 1.3.40
  • Featured Images in RSS for Mailchimp & More: 1.5.7
  • Fluent Forms: 3.6.61
  • Fluent Forms Pro Add On Pack: 3.6.60
  • Inline Related Posts: 2.2.7
  • Interactive Geo Maps: 1.4.5
  • iThemes Security: 7.9.0 (Network enabled)
  • Loco Translate: 2.4.6
  • MainWP Child: 4.1.2
  • Matomo Analytics - Ethical Stats. Powerful Insights.: 4.0.1
  • MaxButtons: 8.3
  • Nofollow for external link: 1.2.3
  • OMGF: 4.2.3
  • OptimizeBuilder: 1.0.34
  • OptimizePress Dashboard: 1.0.37
  • Pretty Links Marketer Edition: 3.2.1
  • Prosodia VGW OS: 3.24.5
  • Q2W3 Fixed Widget: 5.1.9
  • Redirection: 4.9.2
  • reSmush.it Image Optimizer: 0.3.11
  • Search Exclude: 1.2.6
  • Shortcoder: 5.3.3
  • Table of Contents Plus: 2002
  • WebP Express: 0.19.0 (Network enabled)
  • WP Mail SMTP: 2.5.1
  • WP Rocket: 3.7.5
  • WP STAGING: 2.7.8
  • Yoast SEO: 15.3
  • Active Plugins: 3 (matomo wp-rocket wp-staging)


  • Server Info: Apache
  • PHP OS: Linux
  • PHP Version: 7.4.10
  • PHP SAPI: fpm-fcgi
  • PHP Binary Name: php74-fpm
  • PHP Found Binary: php -q
  • Timezone: UTC
  • WP timezone: Pacific/Auckland
  • Locale: en_NZ
  • User Locale: en_NZ
  • Memory Limit: 256M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
  • WP Memory Limit: 40M
  • WP Max Memory Limit: 256M
  • Timezone version: 0.system
  • Time: 1606865663
  • Max Execution Time: 30
  • Max Post Size: 200M
  • Max Upload Size: 209715200
  • Max Input Vars: 10000
  • Disabled PHP functions: No
  • zlib.output_compression is off: Yes
  • Curl Version: 7.47.0, OpenSSL/1.0.2g
  • Suhosin installed: No


  • MySQL Version: 5.7.28
  • Mysqli Connect: Yes
  • Force MySQL over Mysqli: No
  • DB Prefix: wpstg0_
  • DB CHARSET: utf8
  • Uses Socket: No
  • Uses IPv6: No
  • Matomo tables found: 64
  • Matomo users found: 2
  • Matomo sites found: 1
  • Required permissions: OK


  • Browser: (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0)
  • Language: de,en-us,en

@thomas_matomo any news on that topic?

Thanks for this @Julian

any chance you could send me the system report when all the plugins are activated? or a list of all directories in your wp-content/plugins directory? This way I could easily install the same plugins. Currently only the 3 plugins seem activated and with those 3 I can’t reproduce it yet. This would simplify a lot and save me half an hour or so trying to find all the same plugins. Thanks for this.

Thanks @thomas_matomo for getting back to me.
I tried to get the system information when everything is on. But it crashes right away and Matomo won’t let me access anything. So sorry at the moment, it’s a no.

However, all the plugins are activated under normal circumstances.
The only one I usually would not have, is the WP Staging plugin.

If it helps you, I can try to find out which plugin makes it crash, by activating one after the other.

Let me know if that saves you heaps of time. Happy to assist where I can.

Cheers Julian

@MoD666 thanks for this. I have installed as many as possible but could not reproduce the issue yet. Some plugins like Fluent Forms, reSmush, OptimizeBuilder and OptimizePress seem to not be on the WordPress plugins directory and could therefore not install it.

Any chance you have access to your server on the command line (bash)? If so, could you check which plugins contain the file CreateDefinitionHelper.php like this find . -name "CreateDefinitionHelper.php"? I assume this won’t be possible but wanted to ask.

Hi Thomas,

thanks for getting back. Here are the links to Fluent Forms and resmush on the Wordpress depository.

For Optimize Press, I have run a test. I deactivated Optimize Press Dashboard and Builder and had a look if the error is gone.

This is what I did:

  1. Created a staging website.
  2. Deactivated all plugins.
  3. Activated matomo, works fine then. No trouble without any other plugins running.
  4. Activated optimize press dashboard, still works fine.
  5. Activated optimize press builder, now matomo crashes. So from my understanding I’d say it’s a bug in combination with the Optimize Press Builder (v3).

Hope this helps, will send them a message regarding this issue and ask them to check for it as well. Have send them a support query and linked this thread, hope they will add some useful informations. :slight_smile:

Anything else I should do?

Sadly I can’t help with the CreateDefinitionHelper, as I don’t have server access. Sorry.

@thomas_matomo have updatet some informations. Hope you had a good weekend.

Optimize Press got back to me saying the following:

Hi Julian,

Thank you for the response. We do understand your situation but unfortunately, I am no in position to contact them directly. However, I recommend that perhaps you can ask them to contact us regarding about this matter and our higher ups will look into this further. You can ask them if after doing some troubleshooting, the issue still persists.

Anyway, I activated the OptimizePress plugins in your site (I used my test license for the moment) and the Matomo v4 plugin but I’m afraid I was not able to replicate the issue. I can access the OP3 pages without any error. See this short video - https://share.getcloudapp.com/QwublAEB

Could you please advise how we can replicate the issue?

If you have other questions, please let us know.

Kindest regards, …

So seems like they were not too keen on reading this post, have tried to get them to read this at least 3 times. But however, as we know where it comes from now…

Hi @MoD666 thank you very much for all this work. Very appreciated!

I only have an older version but it looks like OptimizePress Dashboard maybe causing the issue and not OptimizeBuilder? It’s possible though that a newer version of OptimizeBuilder may cause this issue. I will try to reach out to them and explain similar to https://wordpress.org/support/topic/php-di-upgrade/

We have been spending quite some time trying to figure out any way to make this work but we couldn’t find any way that will work. I’m hoping they might consider upgrading their PHP-DI library as well as it would be needed for PHP 8 support. I’ll get in touch with them now and otherwise there is very unfortunately only the option to either disable Matomo or the other plugin. Sorry about that and if they get back to me I will let you know.

Hi @thomas_matomo, thanks for getting back.

I have followed your advise and indeed deactivating the dashboard works.
So I will see how to get rid of optimize press.

Thanks for the “workaround” and thanks for your patience.

Cheers Julian