Skip to content

Instantly share code, notes, and snippets.

@yanknudtskov
Created January 4, 2014 13:19
Show Gist options
  • Save yanknudtskov/8255267 to your computer and use it in GitHub Desktop.
Save yanknudtskov/8255267 to your computer and use it in GitHub Desktop.
Move the WordPress Plugin Directory So far we have assumed your plugin directory will be staying inside the content directory, but it doesn’t have to. To ensure maximum compatibility with properly coded plugins, be sure to set both the WP_PLUGIN_DIR and WP_PLUGIN_URL constant. WP_PLUGIN_DIR is the path relative to wp-config’s location and WP_PLU…
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/path/to/plugins' );
define( 'WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/path/to/plugins' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment