Created
February 20, 2015 21:57
-
-
Save jamesmorrison/b011be64097a80899bde to your computer and use it in GitHub Desktop.
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
<?php | |
/*------------------------------------------------------------------------------------------------------------------------- | |
WordPress Config Master | |
-------------------------------------------------------------------------------------------------------------------------*/ | |
// PHP Info | |
if ( isset($_GET['phpinfo']) ) { | |
phpinfo(); | |
return; | |
} | |
// Protocol Check | |
if ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) { | |
$protocol = 'https://'; | |
} else { | |
$protocol = 'http://'; | |
} | |
// Site Specific Name and Paths | |
define('WP_HOME', $protocol . $_SERVER['HTTP_HOST'] ); | |
define('WP_SITEURL', WP_HOME . '/wp'); | |
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' ); | |
define('WP_CONTENT_URL', WP_HOME . '/wp-content'); | |
define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); | |
define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins'); | |
define('PLUGINDIR', WP_CONTENT_DIR . '/plugins' ); | |
// Allow Theme / Plugin Updates | |
define('FS_METHOD', 'direct'); | |
// Stop automated WP updates | |
define('WP_AUTO_UPDATE_CORE', false); | |
// Local DEV definition | |
define('LOCAL_DEV', true); | |
// Debugging | |
if ( isset($_GET['debug']) define('WP_DEBUG', true); | |
if ( !defined('WP_DEBUG') ) define('WP_DEBUG', false); | |
define('WP_DEBUG_LOG', true ); | |
// Load local config file from the respective site | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-config-local.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment