Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save INDIAN2020/d7f589879ea5ca70760c43395187b01d to your computer and use it in GitHub Desktop.
Save INDIAN2020/d7f589879ea5ca70760c43395187b01d 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