Title: Proxy config require wp-load.php path
Last modified: August 31, 2016

---

# Proxy config require wp-load.php path

 *  Resolved [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * (@mcnesium)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/proxy-config-require-wp-loadphp-path/)
 * In my wp-config.php I did `define('WP_SITEURL', WP_HOME . '/wordpress');` so 
   that the root directory is cleaned up a bit. This of course makes `require ('../../../../
   wp-load.php');` in `wp-piwik/proxy/config.php` not work, as it assumes the file
   to sit in the root dir. Instead it just returned a 500 error. Fixing it by adding`
   WP_SITEURL` as well as `ABSPATH` did not work, propably because of the order 
   in which files are loaded and constants are defined. I managed to workaround 
   tis issue by editing it to `require ('../../../../wordpress/wp-load.php');` but
   there must be a solution that works in general. Can you fix this?
 * [https://wordpress.org/plugins/wp-piwik/](https://wordpress.org/plugins/wp-piwik/)

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

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/proxy-config-require-wp-loadphp-path/#post-7090673)
 * I will have a look at this!
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [10 years ago](https://wordpress.org/support/topic/proxy-config-require-wp-loadphp-path/#post-7090682)
 * It’s not that easy, because the proxy script has to know about your SITEURL config
   before this config is loaded (as you assume).
 * After updating to 1.0.7 (release in some minutes) you can place a `config.local.
   php` inside WP-Piwik’s proxy folder.
 * Add following lines to this file:
 *     ```
       <?php
       $wpRootDir = '../../../../wordpress/';
       ```
   
 * This will overwrite WP-Piwik’s configuration (`../../../../`), but is never overwritten
   by WP-Piwik updates. Not a “nice solution”, but working. 😉
 *  Thread Starter [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * (@mcnesium)
 * [10 years ago](https://wordpress.org/support/topic/proxy-config-require-wp-loadphp-path/#post-7090684)
 * Ok thank you. Maybe there will be more elegant solutions for this in the future.

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

The topic ‘Proxy config require wp-load.php path’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3467966)
 * [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

 * [ABSPATH](https://wordpress.org/support/topic-tag/abspath/)
 * [config](https://wordpress.org/support/topic-tag/config/)
 * [proxy](https://wordpress.org/support/topic-tag/proxy/)

 * 3 replies
 * 2 participants
 * Last reply from: [mcnesium](https://wordpress.org/support/users/mcnesium/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/proxy-config-require-wp-loadphp-path/#post-7090684)
 * Status: resolved