Roots Discourse

[SOLVED] Error when trying to access Matomo Admin

Hi all,

I’ve installed the Matomo plugin and tried to access the Admin Page, but I’m getting this error:

Could not find wp-load. If your server uses symlinks or a custom content directory, Matomo may not work for you as we cannot detect the paths correctly. For more information see https://matomo.org/faq/wordpress/how-do-i-make-matomo-for-wordpress-work-when-i-have-a-custom-content-directory/

I tried with the 2nd method mentioned on this page, namely:
2. By creating a file in the plugins directory

I’ve created a file:
…/site/web/wp/wp-content/plugins/matomo.wpload_dir.php

with this content:

<?php exit;
.../sites/mysite/site/web/wp/wp-load.php

but I’m still getting the same error.

Any ideas how can I fix it?

The example uses an absolute path, and you’re using a relative path. I’m not familiar w/ Matomo, but that could be your issue.

Thanks for the quick response!

I meant an absolute path, but I had a local path instead of a path on the server.

I can now access the Matomo Admin page after I did this:

  1. Created a file:

sites/mysite/site/web/app/plugins/matomo.wpload_dir.php

with this content:

<?php exit;
#/srv/www/mysite/current/web/wp/wp-load.php
  1. Updated plugins:

$ composer update

This topic was automatically closed after 42 days. New replies are no longer allowed.