Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork31
Matomo is hiring! Join us →https://matomo.org/jobs Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? ⭐️ 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!
License
matomo-org/matomo-for-wordpress
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A hassle-free and cost-free web analytics platform for your WordPress which lets you stay in full control with 100% data ownership and user-privacy protection.
This plugin installs a fully functionalMatomo within your WordPress. If you already have a working Matomo (eitherOn-Premise orMatomo Cloud), use theConnect Matomo Integration plugin instead. If you have a high traffic website, we recommend using On-Premise or the Cloud-hosted solution for better performance.
Learn more about this plugin in thereadme.txt.
Matomo is released under the GPL v3 (or later) license, seeLICENSE
We believe in liberating Web Analytics, providing a free platform for simple and advanced analytics. Matomo was built by dozens of people like you,and we need your help to make Matomo better… Why not participate in a useful project today?Learn how you can contribute to Matomo.
You can also find more information on ourdeveloper website.
Make sure the plugin folder in your WordPress is not calledmatomo-for-wordpress butmatomo. When you clone the repository you may directly want to specify the right path like this:
git clone git@github.com:matomo-org/matomo-for-wordpress.git wp-content/plugins/matomo
Now run the below command to have phpunit etc available. RequiresComposer to be installed.
composer install# or composer.phar installIf you have docker and docker compose installed, you can setup a local development environment with a single command:
npm run compose up wordpress; npm run compose stopThe first time the container starts it will compile php extensions within the container it needs, download wordpressand set it up.
After starting the container, visithttp://localhost:3000/ to see the list of available wordpress versions.Pick one, and it will take you to Wordpress.
Go to wp-login.php, then enterroot for the user name andpass for the password and login.
Note: docker related files, such as the downloaded wordpress and database files, will be stored in a new folder named./docker. As longas you are using this local dev environment, you should not delete this folder.
Customizing your local environment
You can customize your local environment by setting environment variables in a.env file. Currently, the followingvariables are supported:
PHP_VERSION- defaults to 8.1, must be a version that has an official docker container availableBACKEND- 'mariadb' or 'mysql', defaults to 'mariadb'WORDPRESS_VERSION- defaults to 6.3.1PORT- the port to expose wordpress on, defaults to 3000WP_PLUGINS- a list of plugin/version pairs like "my-plugin my-other-plugin:1.2.3". For each item, wp-cli will attempt to download and activate the plugin.This is the same format as the Active Plugins entry in the System Report, so you could copy that value to this environment variable to quickly (or more quickly)replicate a user's setup.WP_ADMIN_USER- the admin wordpress username, defaults to 'root'. This variable is only used when installing wordpress. It shouldn't be changed afterwards, unless doing a fresh install.WP_ADMIN_EMAIL- the admin user's email, defaults to 'nobody@nowhere.local'. This variable is only used when installing wordpress. It shouldn't be changed afterwards, unless doing a fresh install.WOOCOMMERCE- if set, installs and sets up woocommerce. This includes setting up a payment gateway with stripe and adding some test products. (Note: you will still have to go through woocommerceonboarding as there is no way to disable it, and that means you will have to enter your stripe test keys manually when setting up the payment gateway.)
Running wp-cli
Make sure the wordpress service is running in one terminal, then in another terminal run:
npm run compose run wp --<... rest ofcommand ...>
Running matomo console
Make sure the wordpress service is running in one terminal, then in another terminal run:
npm run compose run console --<... rest ofcommand ...>
Testing on nginx
To run the local dev environment with nginx instead of apache, first make sure there is a127.0.0.1 nginx entry in your/etc/hosts file.
Then run the following command:
npm run compose up nginx fpm; npm run compose stopFinally visithttp://nginx:3000/.
Note: you cannot have both the apache and nginx services running simultaneously as they will try to use the same port.
Accessing MariaDB/MySQL
First ensure the database you want to inspect (mariadb or mysql) is the one that's currently being used by your localenvironment. Then, while the local environment is running in one shell, open another and run the command:
npm run mariadb mariadb
Enterpass for the password.
(For mysql, replace instances of "mariadb" in the command with "mysql".)
Starting a shell in the container
npm run compose -- run wordpress bash
Matomo for WordPress embeds the self-hosted Matomo in theapp/ subdirectory. To update the version that is used,run:
$ cd scripts$ ./update-core.sh <matomo version number>Note: this script will try to run a Matomo console command through docker, so you must have docker installed.
After it finishes, you can see what's changed viagit status.
Security is a top priority at Matomo. As potential issues are discovered, we validate, patch and release fixes as quickly as we can. We have a security bug bounty program in place that rewards researchers for finding security issues and disclosing them to us.
Learn more or check out ourHackerOne program.
Website:matomo.org
About us:matomo.org/team/
Contact us:matomo.org/contact/
About
Matomo is hiring! Join us →https://matomo.org/jobs Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? ⭐️ 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!
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.