matomo-org / matomo-for-wordpress

Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Privacy is built-in. 100% data ownership, no one else can see your data. We love Pull Requests!
https://matomo.org
GNU General Public License v3.0
120 stars 25 forks source link

Error after install #1187

Open Saffronbunny opened 3 weeks ago

Saffronbunny commented 3 weeks ago

Hi!

I just installed it here: https://ronnbergs.se/

Immediately I see warnings:

  1. There are some errors in the Matomo Diagnostics System report that may prevent the plugin for working normally.
  2. There are some issues with your system. Matomo will run, but you might experience some minor problems. See below for more information.

Is there way to fix this?

System report:

              # Matomo

Endpoints

Crons

Mandatory checks

Optional checks

Matomo Settings

Logs

WordPress

WordPress Plugins

MU Plugins

Plugins

Server

PHP cli

Database

Browser

diosmosis commented 3 weeks ago

@Saffronbunny there are warnings in the system report, most have information on how to fix them.

For this one:

PHP CLI configuration: warning (WordPress cannot be loaded via PHP CLI. Please ensure both WordPress and PHP CLI are correctly configured. Note: If you are using get_cfg_var() in your wp-config.php, you will need to make sure the php.ini file for PHP CLI has the correct values. You may need to contact your hosting provider for these changes to be made.)

The easiest fix is to check "Enable archiving via HTTP requests" in Matomo Analytics > Settings > Advanced. Otherwise you will need to figure out why your server's PHP CLI isn't able to load WordPress. You may need to talk to your hosting provider about that.

Saffronbunny commented 3 weeks ago

Thank you, I can see that traffic has been tracked in the WP admin summary since yesterday. I also checked "Enable archiving via HTTP requests" now. I can see there are still errors showing though. Can I somehow activate a new scan of errors to check if these are still relevant?

              # Matomo

Endpoints

Crons

Mandatory checks

Optional checks

Matomo Settings

Logs

WordPress

WordPress Plugins

MU Plugins

Plugins

Server

PHP cli

Database

Browser

diosmosis commented 2 weeks ago

@Saffronbunny this is the same error you posted about in the other issue. Are you using Redis with your WordPress install?

Saffronbunny commented 2 weeks ago

Yes but Teo different sites. The host recommends to install it. It’s not compatible with the Matomo plugin? Skickat från min iPhone23 aug. 2024 kl. 03:38 skrev dizzy @.***>: @Saffronbunny this is the same error you posted about in the other issue. Are you using Redis with your WordPress install?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

diosmosis commented 2 weeks ago

Yes but Teo different sites. The host recommends to install it. It’s not compatible with the Matomo plugin?

Matomo can use redis, though it's not necessary to use it. But this error is not coming from Matomo specifically, but from WordPress, when WordPress is loaded. But only when trying to make a request directly to Matomo, not when loading a WordPress script directly. It's a very strange issue.

If you know, can you tell me more about how redis is used in your WordPress, like how it's configured? You may also want to ask your hosting provider, they may have some additional information that can help here.

Saffronbunny commented 2 weeks ago

OK. For Redis I have followed the instructions in Swedish in the support pages of Loopia, the host. In these pages there are instructions to set up cacheing on their so called Loopia Boost fast server platform. There is an english version of this page but it doesn't have the same information about the Redis Object Cache plugin as the Swedish page. In the english version it says you should add som lines in the wp-config.php file. In the swedish version it says only to add some different lines if you can't access your wp-admin so this is seems a bit strange. I have followed the Swedish instructions.

In Swedish (You might want to translate with google)
https://support.loopia.se/wiki/boost-objektcache/ In English https://support.loopia.com/wiki/loopia-boost-object-cache-redis/

I'll check with their support. Is there something else I should check with them concerning what you say only concerns wordpress? What should I ask please?

Saffronbunny commented 2 weeks ago

It says at the top of the admin interface that there is an error. I can't figure out what that is though. What is the relevant part in the system report now, about the current error? Report for webredaktor.se:

              # Matomo

Endpoints

Crons

Mandatory checks

Optional checks

Matomo Settings

Logs

WordPress

WordPress Plugins

Server

PHP cli

Database

Browser

Saffronbunny commented 2 weeks ago

Here's the report for ronnbergs.se I can see this one has the Redis connection issue which is not in previous now.

              # Matomo

Endpoints

Crons

Mandatory checks

Optional checks

Matomo Settings

Logs

WordPress

WordPress Plugins

MU Plugins

Plugins

Server

PHP cli

Database

Browser

diosmosis commented 2 weeks ago

I'll check with their support. Is there something else I should check with them concerning what you say only concerns wordpress? What should I ask please?

You'd want to ask your hosting provider something like:

"Loading the page https://ronnbergs.se/wp-content/plugins/matomo/app/index.php while logged into WordPress fails with 'Error establishing a Redis connection'. This page loads WordPress by requiring the wp-load.php file. Do you know why, in this case, redis fails to connect?"

Regarding other errors, let's ignore them for now. The redis connection error is the main one to deal with right now, as that one is stopping reports from being generated.