presslabs / gitium

Keep all your WordPress code on git with a simple plugin and a repo
https://www.presslabs.com/code/gitium/
GNU General Public License v2.0
180 stars 31 forks source link

Webhook not working when WordPress is installed in a subfolder #178

Open pdobrescu opened 5 years ago

pdobrescu commented 5 years ago

More details about the issues in the WordPress Support forums here:

https://wordpress.org/support/topic/webhook-not-working-on-site-in-subfolder/

In short, Gitium is trying to use the wp-load.php file from the root of the server and not from the folder where WordPress is installed.

gbruynseels commented 5 years ago

My last answer on Wordpress support:

My solution would be using a relative path starting from the __DIR__ or__FILE__ (dirname(__FILE__)) constant.

For example: $wordpress_loader = __DIR__ . ‘/../../../wp-load.php’; or $wordpress_loader = dirname(__FILE__) . ‘/../../../wp-load.php’;

Thanks for the quick responses.