Last active
August 29, 2015 14:04
-
-
Save jsoningram/b3313c7457647cb0544c to your computer and use it in GitHub Desktop.
Sample WP Config
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 | |
if ( $_SERVER['SERVER_NAME'] == 'ubuntulocal.dev') : | |
define('WP_ENV', 'dev'); | |
else : | |
define('WP_ENV', 'prod'); | |
endif; | |
if (WP_ENV == 'dev') : | |
define("WP_HOME","http://".$_SERVER['HTTP_HOST']."/"."%%INSTALL_DIR%%"); | |
define("WP_SITEURL","http://".$_SERVER['HTTP_HOST']."/"."%%INSTALL_DIR%%"); | |
define('DB_NAME', 'DEV_DBNAME'); | |
define('DB_USER', 'DEV_DBUSER'); | |
define('DB_PASSWORD', 'DEV_DBPASS'); | |
define('DB_HOST', 'localhost'); | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
define('WP_DEBUG_LOG', true); | |
else : | |
define("WP_HOME","http://".$_SERVER['HTTP_HOST'].""); | |
define("WP_SITEURL","http://".$_SERVER['HTTP_HOST'].""); | |
define('DB_NAME', 'PRODUCTION_DBNAME'); | |
define('DB_USER', 'PRODUCTION_DBUSER'); | |
define('DB_PASSWORD', 'PRODUCTION_DBPASS'); | |
define('DB_HOST', 'localhost'); | |
define('WP_DEBUG', false); | |
define('DISALLOW_FILE_EDIT', true); | |
define('FORCE_SSL_LOGIN', true); | |
define('FORCE_SSL_ADMIN', true); | |
define( 'WP_CACHE', true ); | |
define( 'COMPRESS_CSS', true ); | |
define( 'COMPRESS_SCRIPTS', true ); | |
define( 'ENFORCE_GZIP', true ); | |
@ini_set('display_errors','Off'); | |
@ini_set('error_reporting',0); | |
#define( 'WP_AUTO_UPDATE_CORE', true ); | |
#add_filter( 'auto_update_plugin', '__return_true' ); | |
endif; | |
define('WP_DEFAULT_THEME', '%%DEFAULT_THEME%%'); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
// wp secret keys - https://api.wordpress.org/secret-key/1.1/salt/ | |
%%SECRET_KEYS%% | |
$table_prefix = '%%REPLACEPREFIX_%%'; | |
define('WPLANG', ''); | |
if ( !defined('ABSPATH') ) | |
define('ABSPATH', dirname(__FILE__) . '/'); | |
require_once(ABSPATH . 'wp-settings.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment