Title: Loading wp-load.php
Last modified: August 21, 2016

---

# Loading wp-load.php

 *  [CMCDragonkai](https://wordpress.org/support/users/cmcdragonkai/)
 * (@cmcdragonkai)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/)
 * In the wp-load.php it’s currently loading the wp-load.php from:
 * `require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/wp-load.php');`
 * Shouldn’t this be loaded from ABSPATH? Currently my wp-content folder is outside
   the wordpress folder, so when it tries to load wp-load.php it cannot. But if 
   it used ABSPATH, it would work since I defined my ABSPATH directly to the wordpress
   directory.
 * [http://wordpress.org/plugins/wp2cloud-wordpress-to-cloud/](http://wordpress.org/plugins/wp2cloud-wordpress-to-cloud/)

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

 *  Plugin Author [Artem Livshits](https://wordpress.org/support/users/artemlivshits/)
 * (@artemlivshits)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345574)
 * The reason WP2Cloud loads wp-load.php is to handle /wp-content/plugins/wp2cloud-
   wordpress-to-cloud/wp2cloud.php?weblob_id=42/pic.jpg URLs. wp2cloud.php is called
   directly in that case and needs to load wp-load.php to bootstrap WordPress and
   get all context including ABSPATH.
 * So unfortunately, it’s a chicken-and-egg problem, and WP2Cloud needs to know 
   how to include wp-load.php before it can use ABSPATH.
 *  Thread Starter [CMCDragonkai](https://wordpress.org/support/users/cmcdragonkai/)
 * (@cmcdragonkai)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345615)
 * So do you have a proposed solution when the wp-content directory is not in the
   the wordpress directory? Is hardcoding the only option?
 *  Plugin Author [Artem Livshits](https://wordpress.org/support/users/artemlivshits/)
 * (@artemlivshits)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345634)
 * Well, WP2Cloud has to know how to load wp-load.php before it can load wp-load.
   php, so the path has to be configured somewhere. What we can do is to provide
   a way configure the path without modifying the plugin code. If you send an email
   to support (at) oblaksoft (dot) com, we’ll send you an experimental version, 
   so you could see if this works for you.
 *  Thread Starter [CMCDragonkai](https://wordpress.org/support/users/cmcdragonkai/)
 * (@cmcdragonkai)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345645)
 * I sent you an email. Although I load my dependencies through Composer and wpackgist.
   If there’s a way to specify a dev branch on the SVN, or provide a Composer compatible
   wordpress plugin installer, it would be great.
 *  Plugin Author [Artem Livshits](https://wordpress.org/support/users/artemlivshits/)
 * (@artemlivshits)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345650)
 * The new plugin version 1.3.11 (just released) supports optional wp2cloud-config.
   php that can be added to the plugin directory to configure ABSPATH.
 * The wp2cloud-config.php should contain code like this:
 *     ```
       <?php define('ABSPATH', '/your/custom/abspath');
       ```
   
 * This way the ABSPATH can be customized without changing the plugin’s code.

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

The topic ‘Loading wp-load.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp2cloud-wordpress-to-cloud.svg)
 * [WP2Cloud](https://wordpress.org/plugins/wp2cloud-wordpress-to-cloud/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp2cloud-wordpress-to-cloud/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp2cloud-wordpress-to-cloud/)
 * [Active Topics](https://wordpress.org/support/plugin/wp2cloud-wordpress-to-cloud/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp2cloud-wordpress-to-cloud/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp2cloud-wordpress-to-cloud/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Artem Livshits](https://wordpress.org/support/users/artemlivshits/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/loading-wp-loadphp/#post-4345650)
 * Status: not resolved