Title: Scripts / CSS Broken when changing plugin directory
Last modified: August 21, 2016

---

# Scripts / CSS Broken when changing plugin directory

 *  [mikecorkum](https://wordpress.org/support/users/mikecorkum/)
 * (@mikecorkum)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/scripts-css-broken-when-changing-plugin-directory/)
 * Hi there,
 * I’m hoping you can help. We run over 200 sites using your plugin so it makes 
   sense for us to have our plugin folder at the root of the server.
 * The plugin mainly works, but the scripts or CSS don’t point to the right place.
   They still point to the wp-content/plugins folder.
 * We set it up like this in our WP-Config file
 *     ```
       define('WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/plugins' );
       define('WP_PLUGIN_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/plugins');
       ```
   
 * I’ve even tried adding (suggested on another form, but really shouldn’t be required)
   `
   define('PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/plugins' );`
 * Using this method, console reports errors trying to load the scripts from the
   server path with an http:// infront of it, it makes no change to the CSS files.
 * I am able to fix this by editing the plugin and changing instances of “‘/’ . 
   PLUGINDIR .” to “WP_PLUGIN_URL” – but that kills my update path.
 * Hoping you can help!
 * [http://wordpress.org/extend/plugins/custom-field-template/](http://wordpress.org/extend/plugins/custom-field-template/)

The topic ‘Scripts / CSS Broken when changing plugin directory’ is closed to new
replies.

 * ![](https://ps.w.org/custom-field-template/assets/icon-256x256.png?rev=1966286)
 * [Custom Field Template](https://wordpress.org/plugins/custom-field-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-field-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-field-template/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-field-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-field-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-field-template/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mikecorkum](https://wordpress.org/support/users/mikecorkum/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/scripts-css-broken-when-changing-plugin-directory/)
 * Status: not resolved