change the wp-content and plugins directory

Hi I am trying to do a custom install for wordpress and I need to change wp-content and plugin-directories.

I tried to add this to the wp-config.php after I installed wordpress

Read More

define( ‘WP_CONTENT_DIR’, dirname( FILE ) . ‘wp-content’ );
define( ‘WP_CONTENT_URL’, ‘myurl/wp-content’ );

but I still see the defaults plugins I did the same for WP_PLUGIN_DIR and WP_PLUGIN_URL.

Can anyone help me. Thanks in advance.

Related posts

Leave a Reply

2 comments

  1. Use this for Plugin folder

    define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/somedir' );
    

    Use this for WP-content folder

    define( 'WP_CONTENT_DIR',  $_SERVER['DOCUMENT_ROOT'] . '/somedir' );
    
  2. Use this code…

    define( 'WP_CONTENT_DIR', dirname(__FILE__) . 'path/to/wp-content' );
    
    define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/path/to/wp-content' );