Change the path where wordpress plugins are uploaded

Currently my plugins are getting uploaded to public_html/sitename/wp-content/plugins instead of public_html/wp-content/plugins. Is there any way that I can change the path where word press uploads the plugins?

I had moved my site to the root folder and hence this issue arose.

Related posts

Leave a Reply

1 comment

  1. You can change the Plugins directory using constants defined in wp-config.php:

    Set WP_CONTENT_DIR to the full local path of this directory (no
    trailing slash), e.g.

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
    

    Set WP_CONTENT_URL to the full URI of this directory (no trailing
    slash), e.g.

    define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
    

    Set WP_PLUGIN_DIR to the full local path of this directory (no
    trailing slash), e.g.

    define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
    

    Set WP_PLUGIN_URL to the full URI of this directory (no trailing
    slash), e.g.

    define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins');
    

    If you have compability issues with plugins Set PLUGINDIR to the full
    local path of this directory (no trailing slash), e.g.

    define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
    

    But wait!

    If the need to define these paths originates from moving your installation from a subdirectory to the document root, your problem is very likely that you didn’t make that move properly. Please reference this Codex entry about giving WordPress its own directory.