Skip to content

Instantly share code, notes, and snippets.

@HoundstoothSTL
Last active December 10, 2015 17:08
Show Gist options
  • Save HoundstoothSTL/4465180 to your computer and use it in GitHub Desktop.
Save HoundstoothSTL/4465180 to your computer and use it in GitHub Desktop.
WordPress configuration setup for multiple server environments.
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
if ( file_exists( dirname( __FILE__ ) . '/../env_local' ) ) {
// Local Environment
define('WP_ENV', 'local');
define('WP_DEBUG', false);
define('DB_NAME', 'xxxxxx');
define('DB_USER', 'xxxxxx');
define('DB_PASSWORD', 'xxxxxx');
define('DB_HOST', 'localhost');
} elseif ( file_exists( dirname( __FILE__ ) . '/../env_staging' ) ) {
define('WP_ENV', 'staging');
define('WP_DEBUG', false);
//Staging Environment
define('DB_NAME', 'xxxxxx');
define('DB_USER', 'xxxxxx');
define('DB_PASSWORD', 'xxxxxx');
define('DB_HOST', 'xxxxxx');
} else {
define('WP_ENV', 'production');
define('WP_DEBUG', false);
//Production Environment
define('DB_NAME', 'xxxxxx');
define('DB_USER', 'xxxxxx');
define('DB_PASSWORD', 'xxxxxx');
define('DB_HOST', 'xxxxxx');
}
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'C!Ie,=)~l+.Z9odTP*5K~is>3_|,QpKeYl>r+0xt[8.U]ckp+Rfc-RKs![+fMtk>');
define('SECURE_AUTH_KEY', 'eHaY<F.ItOeM+2T_D]=-^2>D!K_z^C%5OcR,J#5aNrZ1&*bR{Pfsj>+vL<2P9E)W');
define('LOGGED_IN_KEY', 'FnqEw;/Or447|!]~%HZ(>gF6 rr~V3+-pG0Gctr|-IRn%SehaHY$;he$c;EP%PKP');
define('NONCE_KEY', 'vd{mg IQrR|dM/>jLE1/cp+btVI d|<q_!X>pjglns{E(0;y3_Z9?KH/s5W#|:4%');
define('AUTH_SALT', 'S_g);Q@[,M##,et$5x)-a XkOBoR X?~SD|$ChCu+X||3}VfBe:sV[I;+<Vt/+Aq');
define('SECURE_AUTH_SALT', 'vpQa_GW03-4E8(n|4C0da!S/f,MroJaVKc.D*~i683+%e[Mc.]LTN&f/uaH+#G`&');
define('LOGGED_IN_SALT', '8a*gjDChH~>8,~`V!U(0^ho5*(Q/&KnKxLJO1B+!m_:UL;I7-j(aM`!)=8c./b~n');
define('NONCE_SALT', 'KE|V%<o6-LrI+xu7-1*D{5ayQ20DBxy6,Hz_yy~H*qcx&._48Gl=|A8mVnHU?req');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
* language support.
*/
define('WPLANG', '');
define('WP_MEMORY_LIMIT', '24M');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment