Title: Custom wp-content folder not supported?
Last modified: August 21, 2016

---

# Custom wp-content folder not supported?

 *  Resolved [simenschi](https://wordpress.org/support/users/simenschi/)
 * (@simenschi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/)
 * Hi! I’m setting up all my WordPress sites with WordPress in a sub directory and
   wp-content in a custom folder, as recommended by [WordPress-Skeleton](https://github.com/markjaquith/WordPress-Skeleton),
   [Roots/Bedrock](http://roots.io/) among others.
 * Does the Booking Calendar plugin support this at all? I haven’t had any problems
   with structuring wordpress this way before, but when I install Booking Calendar
   the layout seemed wrong, and it didn’t find any images, so I checked the sources,
   and it shows that Booking Calendar uses “/wp-content”, even though the default
   wp-content directory is set to something different. Other plugins work fine on
   the same installation. Look at the screenshot bellow(showing URL’s for Booking
   Calendar and the Types plugin in the same installation):
    [https://www.dropbox.com/s/3230wn004k42wxp/Screenshot%202014-01-26%2011.12.33.png](https://www.dropbox.com/s/3230wn004k42wxp/Screenshot%202014-01-26%2011.12.33.png)
 * Here’s a screenshot of Booking Calendars main page in the wordpress dashboard:
   
   [https://www.dropbox.com/s/c0juo10xvotgtvf/Screenshot%202014-01-26%2011.20.02.png](https://www.dropbox.com/s/c0juo10xvotgtvf/Screenshot%202014-01-26%2011.20.02.png)
 * Looks to me that the URL Booking Calendar is using for wp_content is hard coded
   instead of using [WordPress’ content_url()](http://codex.wordpress.org/Function_Reference/content_url)..?
   
   Is this a known bug, and/or is there any way to get around this?
 * [http://wordpress.org/plugins/booking/](http://wordpress.org/plugins/booking/)

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

 *  Plugin Author [wpdevelop](https://wordpress.org/support/users/wpdevelop/)
 * (@wpdevelop)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544273)
 * Hello.
    Its known issue. We will fix it in next update. In the actual version,
   you are need to make this fix. Please open this file ../booking/wpdev-booking.
   php
 * then find this code:
 *     ```
       if (!defined('WP_CONTENT_DIR'))      define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
           if (!defined('WP_CONTENT_URL'))      define('WP_CONTENT_URL', $wpdev_bk_my_site_url . '/wp-content');
           if (!defined('WP_PLUGIN_DIR'))       define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
           if (!defined('WP_PLUGIN_URL'))       define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
           if (!defined('WPDEV_BK_PLUGIN_FILENAME'))  define('WPDEV_BK_PLUGIN_FILENAME',  basename( __FILE__ ) );
           if (!defined('WPDEV_BK_PLUGIN_DIRNAME'))   define('WPDEV_BK_PLUGIN_DIRNAME',  plugin_basename(dirname(__FILE__)) );
           if (!defined('WPDEV_BK_PLUGIN_DIR')) define('WPDEV_BK_PLUGIN_DIR', WP_PLUGIN_DIR.'/'.WPDEV_BK_PLUGIN_DIRNAME );
           if (!defined('WPDEV_BK_PLUGIN_URL')) define('WPDEV_BK_PLUGIN_URL', $wpdev_bk_my_site_url.'/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME );
       ```
   
 * and replace it to this code:
 *     ```
       if (!defined('WP_CONTENT_DIR'))            define('WP_CONTENT_DIR', ABSPATH . 'wp-content');                        // Z:\home\server.com\www/wp-content
           if (!defined('WP_PLUGIN_DIR'))             define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');                    // Z:\home\server.com\www/wp-content/plugins
           if (!defined('WPDEV_BK_PLUGIN_FILENAME'))  define('WPDEV_BK_PLUGIN_FILENAME',  basename( __FILE__ ) );              // menu-compouser.php
           if (!defined('WPDEV_BK_PLUGIN_DIRNAME'))   define('WPDEV_BK_PLUGIN_DIRNAME',  plugin_basename(dirname(__FILE__)) ); // menu-compouser
           if (!defined('WPDEV_BK_PLUGIN_DIR'))       define('WPDEV_BK_PLUGIN_DIR', WP_PLUGIN_DIR.'/'.WPDEV_BK_PLUGIN_DIRNAME ); // Z:\home\server.com\www/wp-content/plugins/menu-compouser
           if (!defined('WP_CONTENT_URL'))      define('WP_CONTENT_URL', content_url() );                          // http://server.com/wp-content
           if (!defined('WP_PLUGIN_URL'))       define('WP_PLUGIN_URL',  plugins_url() );                          // http://server.com/wp-content/plugins
           if (!defined('WPDEV_BK_PLUGIN_URL')) define('WPDEV_BK_PLUGIN_URL', plugins_url( '', WPDEV_BK_FILE ) );  // http://server.com/wp-content/plugins/menu-compouser
       ```
   
 * Also please open this file ../booking/lib/wpdev-booking-class.php
 * then find this code:
 *     ```
       var wpdev_bk_plugin_url     = '<?php
                   if (WP_BK_SSL) {   // Activate SSL
                       $bk_url_for_js = site_url( '/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME, 'https' );
                       $my_parsed_url = parse_url($bk_url_for_js);
                       echo $my_parsed_url['scheme'] . '://'. $_SERVER['SERVER_NAME'] . $my_parsed_url['path'] ;
                   } else {
                       echo site_url( '/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME );
                   }
                   ?>';
       ```
   
 * and replace it to this code:
 *     ```
       var wpdev_bk_plugin_url     = '<?php
                   echo   plugins_url( '' , WPDEV_BK_FILE );
                   ?>';
       ```
   
 *  Thread Starter [simenschi](https://wordpress.org/support/users/simenschi/)
 * (@simenschi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544287)
 * Great, thank you!
 * Looking forward to the update!
 *  Thread Starter [simenschi](https://wordpress.org/support/users/simenschi/)
 * (@simenschi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544522)
 * Seems I’ve got another issue after I edited the file. Now I’m getting the 500
   server error, and the file _/app/plugins/booking/wpdev-booking.php_ says I can’t
   access it. Even though I’ve set the permissions to 777, 755 and 644. The file
   says “You do not have permission to direct access to this file !!!” no matter
   what.
 * Is there anything else I can check besides the permissions?
 *  Plugin Author [wpdevelop](https://wordpress.org/support/users/wpdevelop/)
 * (@wpdevelop)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544523)
 * Hello.
    1) This warning “”You do not have permission to direct access to this
   file !!!” is correct, it have to be so, if you try to open the direct URL to 
   that file in browser.
 * 2) According 500 server error.
    Please recheck carefully, that you was made all
   changes correctly and do not make any mistakes. Please recheck the error.log 
   file of your server, so you be sure in a reason of that issue and then we can
   fix it. Kind regards.
 *  Thread Starter [simenschi](https://wordpress.org/support/users/simenschi/)
 * (@simenschi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544524)
 * Thanks for the quick answer!
 * 1) Ah, I see.
 * 2) I reinstalled the plugin and did the changes to the files carefully to make
   sure I didn’t make any mistakes before. But I still get the same error. The error
   log(in chrome) says the following:
 * `POST http://test.bookingcalendar.dev/app/plugins/booking/wpdev-booking.php 500(
   Internal Server Error)`
 * I checked the PHP-log, which says the following:
    `[05-Feb-2014 10:24:34 UTC]
   PHP Fatal error: require_once() [<a href='function.require'>function.require</
   a>]: Failed opening required '/Users/lain/Public/Testprosjekter/booking_calendar/
   app/plugins/booking/../../../wp-load.php' (include_path='.:/Applications/MAMP/
   bin/php/php5.3.14/lib/php') in /Users/lain/Public/Testprosjekter/booking_calendar/
   app/plugins/booking/wpdev-booking.php on line 183`
 * In other words, it’s trying to access the wp-load.php file thats in the root 
   of the wordpress installation, but since I have mine in a sub folder the path
   is wrong. So I guess the line 183 in _wpdev-booking.php_
    `require_once( dirname(
   __FILE__) . '/../../../wp-load.php' );` should be a path containing the wordpress
   core-folder. [Found some thoughts about that here.](http://wordpress.stackexchange.com/questions/76463/how-to-determine-wordpress-base-path-when-wordpress-core-is-not-loaded)
   But I guess there should be a way to find the wordpress core path fom wordpress
   itself..?
 * Anyway, I changed the path to my wordpress core folder(which was sub folder),
   and that did the trick.
 *  Plugin Author [wpdevelop](https://wordpress.org/support/users/wpdevelop/)
 * (@wpdevelop)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544525)
 * Hello.
    Good to know that you fixed an issue. And thank you about your suggestion.
   I will add this fix to the next update. Kind regards.
 *  [stephanieailie](https://wordpress.org/support/users/stephanieailie/)
 * (@stephanieailie)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544559)
 * I also having the same issue. But I couldn’t find the code that you have stated
   in the file ../booking/wpdev-booking.php and ../booking/lib/wpdev-booking-class.
   php.
 * Anyway have this issue being fix?
 * Warmest regards.
 *  Plugin Author [wpdevelop](https://wordpress.org/support/users/wpdevelop/)
 * (@wpdevelop)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544560)
 * Hello.
    If you are using latest version 5.1.6, so all files includes you can 
   find at the ../booking/lib/wpdev-include.php file.
 * But please, note, the latest 5.1.6 update have to support the custom wp-content
   folder.
    Did you sure that issue relative to the wrong folder ? Kind Regards.

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

The topic ‘Custom wp-content folder not supported?’ is closed to new replies.

 * ![](https://ps.w.org/booking/assets/icon-256x256.gif?rev=3335907)
 * [Booking Calendar](https://wordpress.org/plugins/booking/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/booking/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/booking/)
 * [Active Topics](https://wordpress.org/support/plugin/booking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/booking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/booking/reviews/)

## Tags

 * [url](https://wordpress.org/support/topic-tag/url/)
 * [wp-content](https://wordpress.org/support/topic-tag/wp-content/)
 * [wrong URL](https://wordpress.org/support/topic-tag/wrong-url/)

 * 8 replies
 * 3 participants
 * Last reply from: [wpdevelop](https://wordpress.org/support/users/wpdevelop/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/custom-wp-content-folder-not-supported/#post-4544560)
 * Status: resolved