Title: correct Piwik path (PHP API)
Last modified: August 24, 2016

---

# correct Piwik path (PHP API)

 *  [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * (@mcnesium)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/)
 * I am trying to set the correct Piwik path (PHP API) in the settings. It keeps
   telling me the path was invalid. The wordpress is at `/var/www/vhosts/wordpress.
   domain/httpdocs/`. I tried to enter:
    * `/var/www/vhosts/piwik.domain/httpdocs/
   piwik.php` * `/var/www/vhosts/piwik.domain/httpdocs/` as well as relative paths.
   I even tried to symlink and to mount the Piwik directory into a subdirectory 
   of the wordpress path. None of it worked. What would be the correct way to enter
   the path?
 * [https://wordpress.org/plugins/wp-piwik/](https://wordpress.org/plugins/wp-piwik/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002035)
 * The full path is the best way to enter the Piwik path (without a specific file),
   so
    `/var/www/vhosts/piwik.domain/httpdocs/` should be the right choice.
 * Please also check, if PHP safe mode is enabled and the Piwik directory is configured
   as safe_mode_include_dir of your wordpress.domain environment. Also using open_base_dir
   can avoid opening files from directories outside your current environment.
 * See [http://php.net/manual/en/ini.sect.safe-mode.php](http://php.net/manual/en/ini.sect.safe-mode.php)
   and [http://php.net/manual/en/ini.core.php#ini.open-basedir](http://php.net/manual/en/ini.core.php#ini.open-basedir)
 * You can enable WordPress’ debugging to check if there occur any safe mode related
   messages like
 *     ```
       Warning: SAFE MODE Restriction in effect. The script whose uid is 500 is
       not allowed to access /var/www/vhosts/piwik.domain/httpdocs/index.php
       owned by uid 0 in /var/www/vhosts/wordpress.domain/httpdocs/wp-content
       /plugins/wp-piwik/wp-piwik.php
       ```
   
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002188)
 * Did you get it working? Any other issues?
 *  Thread Starter [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * (@mcnesium)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002210)
 * no sorry, I had to go back to the javascript solution for now. I come back here
   whenever I get to work on this issue
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002218)
 * Just to avoid a misunderstanding: You can choose between the REST Reporting API(
   http) and the PHP Reporting API. WP-Piwik does not support the PHP Tracking API,
   so the JavaScript tracking code is still necessary.
 *  Thread Starter [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * (@mcnesium)
 * [11 years ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002219)
 * I see. So the PHP Api is for the WP Backend only. This should be documented more
   explicitly imho. Thank you for the addon, anyway.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘correct Piwik path (PHP API)’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [path](https://wordpress.org/support/topic-tag/path/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [piwik](https://wordpress.org/support/topic-tag/piwik/)

 * 5 replies
 * 2 participants
 * Last reply from: [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/correct-piwik-path-php-api/#post-6002219)
 * Status: not a support question