Support » Plugin: Codestyling Localization » Sites with alternate wp-content locations – cs not happy withself

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codestyling


    How did you configure this sharing of the content folder?
    It looks like a local Apache test system. I would need any modifications as description to be able to reproduce it at my local dev environment.

    Hi Heiko,


    in wp-config.php, add these lines

    define( ‘WP_CONTENT_DIR’, ‘C:\wamp\www\wp\wp-content’ );
    define( ‘WP_CONTENT_URL’, ‘http://localhost/wp/wp-content’);

    I use to have:
    //define( ‘WP_PLUGIN_DIR’, ‘C:\wamp\www\wp\wp-content/plugins’ );
    //define( ‘WP_PLUGIN_URL’, ‘http://localhost/wp/wp-content/plugins’);
    but too many plugins don’t cope with that at all.

    Many plugins don’t know about these (or even worse partially cater for them). Sharing the user table is also fun to do (NOT :-)) especially when a membership plugin seems to cater for it (using $wpdb->, but not everywhere!

    regards, anmari

    Plugin Author codestyling


    The definition does not contain all necessary replacements. Let’s say, you want to replace the wp-content folder with my-playground folder.
    Than you modifiy the wp-config.php file below the already existing first 3 lines:

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    define( 'WP_CONTENT_DIR', ABSPATH . 'my-playground' );
    define( 'WP_CONTENT_URL', 'http://wp35.test/my-playground'); // full url - WP_CONTENT_DIR is defined further up
    define( 'PLUGINDIR', 'my-playground/plugins' );
    define( 'MUPLUGINDIR', 'my-playground/mu-plugins' );

    All other directory constants will now be created appropriated by WordPress startup process and will work as expected.

    Keep in mind, I’m using local vhosts with my Apache, so I have the domain “wp35.test” locally as a vhost. It also works for appropriated configured localhosts but I would always prefer vhost usage locally.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sites with alternate wp-content locations – cs not happy withself’ is closed to new replies.