Last active
August 29, 2015 14:01
-
-
Save theMikeD/084abf3be77deb09ff02 to your computer and use it in GitHub Desktop.
Code to specify a location for Wordpress's wp-content folder. Goes into wp-config.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$md_http = ($_SERVER['HTTPS']) ? 'https://': 'http://'; | |
// MD: Note that $_SERVER['DOCUMENT_ROOT'] will return a string with a trailing slash on | |
// some systems and not others, so we'll make sure it's gone in all cases where there | |
// is ambiguity by using rtrim | |
define('WP_CONTENT_DIR', rtrim($_SERVER['DOCUMENT_ROOT'],"/") . '/wp-content'); | |
define('WP_CONTENT_URL', $md_http . rtrim($_SERVER['SERVER_NAME'],"/") . '/wp-content'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment