Last active
October 21, 2015 13:53
-
-
Save jfitzsimmons2/2713ddfa23b26416efe4 to your computer and use it in GitHub Desktop.
My boilerplate wp-config.php file for working locally with WordPress
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 ( file_exists( dirname( __FILE__ ) . '/wp-local-config.php' ) ) { | |
include( dirname( __FILE__ ) . '/wp-local-config.php' ); | |
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later | |
} else { | |
define('DB_NAME', 'database_name_here'); | |
define('DB_USER', 'username_here'); | |
define('DB_PASSWORD', 'password_here'); | |
define('DB_HOST', 'localhost'); | |
} | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
// https://api.wordpress.org/secret-key/1.1/salt/ | |
define('AUTH_KEY', 'put your unique phrase here'); | |
define('SECURE_AUTH_KEY', 'put your unique phrase here'); | |
define('LOGGED_IN_KEY', 'put your unique phrase here'); | |
define('NONCE_KEY', 'put your unique phrase here'); | |
define('AUTH_SALT', 'put your unique phrase here'); | |
define('SECURE_AUTH_SALT', 'put your unique phrase here'); | |
define('LOGGED_IN_SALT', 'put your unique phrase here'); | |
define('NONCE_SALT', 'put your unique phrase here'); | |
$table_prefix = 'wp_'; | |
define('WPLANG', ''); | |
define('WP_DEBUG', false); | |
if ( !defined('ABSPATH') ) | |
define('ABSPATH', dirname(__FILE__) . '/'); | |
require_once(ABSPATH . 'wp-settings.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
<?php | |
//Local DB credentials | |
define('DB_NAME', 'database_name_here'); | |
define('DB_USER', 'username_here'); | |
define('DB_PASSWORD', 'password_here'); | |
define('DB_HOST', 'localhost'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment