Last active
June 22, 2019 01:38
-
-
Save earth3300/28ca24623239880c979f3edb3dc5b127 to your computer and use it in GitHub Desktop.
Modified wp-config.php file. This is the template. Copy to wp-config.php and adjust as needed.
This file contains hidden or 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 | |
| /** | |
| * The base configuration for WordPress | |
| * | |
| * The wp-config.php creation script uses this file during the | |
| * installation. You don't have to use the web site, you can | |
| * copy this file to "wp-config.php" and fill in the values. | |
| * | |
| * This file contains the following configurations: | |
| * | |
| * * MySQL settings | |
| * * Secret keys | |
| * * Database table prefix | |
| * * ABSPATH | |
| * | |
| * @link https://codex.wordpress.org/Editing_wp-config.php | |
| * | |
| * @package WordPress | |
| * | |
| * File: wp-config.php | |
| * Created: 2019-04-01 | |
| * Updated: 2019-06-21 | |
| * Time: 21:16 EDT | |
| */ | |
| /** Default: false (when true, requires {wp-content}/advanced-cache.php). */ | |
| define( 'WP_CACHE', true ); | |
| /** Post type (Default: post). */ | |
| define( 'WP_POST_TYPE', 'post' ); | |
| /** MySQL hostname */ | |
| define( 'DB_HOST', 'localhost' ); | |
| /** Database Charset to use in creating database tables. */ | |
| define( 'DB_CHARSET', 'utf8mb4' ); | |
| /** The Database Collate type. Don't change this if in doubt. */ | |
| define( 'DB_COLLATE', 'utf8mb4_unicode_ci' ); | |
| /** Example: 'en-CA' Used in the HTML Page. */ | |
| define( 'SITE_LANG', 'en-CA' ); | |
| /** Default: UTF-8 (Used in the HTML Page) */ | |
| define( 'SITE_CHARSET', 'UTF-8' ); | |
| /** Used in the browser tab and site header. Default Below. */ | |
| define( 'SITE_TITLE', 'Site Title' ); | |
| /** Tagline. Used in site header. Default Below. */ | |
| define( 'SITE_DESCRIPTION', 'Site Description' ); | |
| /** Default: false */ | |
| define( 'SITE_CSS_FONTS', 'Libre+Baskerville|PT+Sans' ); | |
| /** Location of the core directory, from the root. */ | |
| define( 'SITE_CORE_DIR', '/e/5.2.1' ); // Empty if WordPress core is in root. | |
| if ( ! defined( 'SITE_ROOT_PATH' ) ) | |
| { | |
| /** The root of the site (not the core files). Required. */ | |
| define( 'SITE_ROOT_PATH', rtrim( __DIR__, SITE_CORE_DIR ) ); | |
| } | |
| /** {wp-content} is a catchall "bin", thus the term here. */ | |
| 1 ? define( 'SITE_BIN_DIR', '/b' ) : ''; // Default: /b | |
| /** For images, video, audio, PDFs, etc. Keep /uploads for now. Try /media. */ | |
| 1 ? define( 'SITE_MEDIA_DIR', '/uploads' ) : ''; | |
| /** For required plugins (must use). */ | |
| 1 ? define( 'SITE_REQUIRED_DIR', '/required' ) : ''; | |
| /** For required plugins (must use). */ | |
| 1 ? define( 'SITE_CONFIG_PATH', SITE_ROOT_PATH . '/b/config' ) : ''; | |
| /** SITE_LOG_PATH. */ | |
| 1 ? define( 'SITE_LOG_PATH', SITE_ROOT_PATH . '/b/logs' ) : ''; | |
| /** WooCommerce Log Directory. (Overrides default). */ | |
| 0 ? define( 'WC_LOG_DIR', SITE_LOG_PATH . '/woo' ) : ''; | |
| /** Default: false */ | |
| define( 'SITE_USE_WP_HEAD', false ); | |
| /** Default: false */ | |
| define( 'SITE_USE_WP_FOOTER', false ); | |
| /** Default: false */ | |
| define( 'SITE_USE_CSS_FONTS', false ); | |
| /** Default: false */ | |
| define( 'SITE_USE_CSS_MIN', false ); | |
| /** Default: false */ | |
| define( 'SITE_USE_CSS_ALL', true ); | |
| /** Default: false */ | |
| define( 'SITE_USE_AUTO_PARA', true ); | |
| /** Default: false (true for increased security). */ | |
| define( 'DISALLOW_UNFILTERED_HTML', true ); | |
| /** Disable plugin and theme file editing for increased security. */ | |
| define( 'DISALLOW_FILE_EDIT', true ); | |
| /** Disable plugin updating and deleting for better stability and security. */ | |
| define( 'DISALLOW_FILE_MODS', true ); | |
| /** Disable core, theme and plugin updates for better stability. */ | |
| define( 'AUTOMATIC_UPDATER_DISABLED', true ); | |
| /** Disable unattended core updates for better stability. */ | |
| define( 'WP_AUTO_UPDATE_CORE', false ); | |
| /** Disable the virtual cron for imp. performance. Requires server side cron. */ | |
| define( 'DISABLE_WP_CRON', true ); | |
| /** Do not allow unfiltered uploads. */ | |
| define( 'ALLOW_UNFILTERED_UPLOADS', false ); | |
| /** Allow image edits to overwrite images for decreased file usage. */ | |
| define( 'IMAGE_EDIT_OVERWRITE', true ); | |
| /** No post revisions for better database usage. (Know what you write). */ | |
| define( 'WP_POST_REVISIONS', false ); | |
| /** Increase the autosave interval. Try 300 (seconds). */ | |
| define( 'AUTOSAVE_INTERVAL', 300 ); | |
| /** Default: 30 */ | |
| define( 'EMPTY_TRASH_DAYS', 30 ); | |
| /** Default: 60 (seconds). */ | |
| define( 'WP_CRON_LOCK_TIMEOUT', 60 ); | |
| /** Default: 40M */ | |
| define( 'WP_MEMORY_LIMIT', '40M' ); | |
| /** Last Default: 256M */ | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); | |
| /** This is a path, not a directory (Misnomer). */ | |
| 1 ? define( 'WP_CONTENT_DIR', SITE_ROOT_PATH . SITE_BIN_DIR ) : ''; | |
| /** Uploads directory. See note below. Takes priority. */ | |
| 1 ? define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . SITE_MEDIA_DIR ) : ''; | |
| /** One more poorly formatted constant (for multisite). */ | |
| 1 ? define( 'UPLOADBLOGSDIR', WP_CONTENT_DIR . SITE_MEDIA_DIR ) : ''; | |
| /** Uploads directory (a directory, not a path). */ | |
| 0 ? define( 'UPLOADS', SITE_MEDIA_DIR ) : ''; | |
| /** Default: 'wp-content/mu-plugins' (Must Use Plugin Directory *Stub*) */ | |
| 1 ? define( 'MUPLUGINDIR', WP_CONTENT_DIR . SITE_REQUIRED_DIR ) : ''; | |
| /** Default: 'wp-content/mu-plugins' (Must Use Plugins *Path*) */ | |
| 1 ? define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . SITE_REQUIRED_DIR ) : ''; | |
| /** Default: 'wp-content/mu-plugins' (Must Use Plugins URL) */ | |
| 1 ? define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . SITE_REQUIRED_DIR ) : ''; | |
| //**** USER SPECIFIC SETTINGS BELOW THIS LINE ****// | |
| // Credentials: local, staging, production. | |
| if ( '127.0.0.1' == $_SERVER['SERVER_ADDR'] ) | |
| { | |
| /** Development: true. */ | |
| define( 'WP_DEBUG', true ); | |
| /** Local: http:// probably O.K. */ | |
| define( 'SITE_PROTOCOL', 'http://' ); | |
| /** Local value. */ | |
| define( 'SITE_SERVER_NAME', $_SERVER['SERVER_NAME'] ); | |
| /** The name of the database for WordPress */ | |
| define('DB_NAME', ''); | |
| /** MySQL database username */ | |
| define('DB_USER', ''); | |
| /** MySQL database password */ | |
| define('DB_PASSWORD', ''); | |
| /** Local: no bots, but put false anyways. */ | |
| define( 'SITE_INDEX_ALLOW', false ); | |
| /** ... */ | |
| } | |
| elseif( file_exists( SITE_ROOT_PATH . '/.staging' ) ) | |
| { | |
| /** Staging: true. */ | |
| define( 'WP_DEBUG', true ); | |
| /** Staging: http:// maybe O.K. */ | |
| define( 'SITE_PROTOCOL', 'http://' ); | |
| /** Staging value. */ | |
| define( 'SITE_SERVER_NAME', $_SERVER['SERVER_NAME'] ); | |
| /** The name of the database for WordPress */ | |
| define( 'DB_NAME', '' ); | |
| /** MySQL database username */ | |
| define( 'DB_USER', '' ); | |
| /** MySQL database password */ | |
| define( 'DB_PASSWORD', '' ); | |
| /** Staging: Definitely want this to be false. */ | |
| define( 'SITE_INDEX_ALLOW', false ); | |
| } | |
| else | |
| { | |
| /** Production: false. */ | |
| define( 'WP_DEBUG', false ); | |
| /** Production: https:// better. */ | |
| define( 'SITE_PROTOCOL', 'https://' ); | |
| /** Production value (include www. or subdomain.). */ | |
| define( 'SITE_SERVER_NAME', '' ); | |
| /** The name of the database for WordPress */ | |
| define( 'DB_NAME', '' ); | |
| /** MySQL database username */ | |
| define( 'DB_USER', '' ); | |
| /** MySQL database password */ | |
| define( 'DB_PASSWORD', '' ); | |
| /** Production: probably want this to be true. */ | |
| define( 'SITE_INDEX_ALLOW', true ); | |
| } | |
| if ( WP_DEBUG ) | |
| { | |
| /** Echo or dump errors to the website. */ | |
| 0 ? define( 'WP_DEBUG_DISPLAY', true ) : ''; | |
| /** Set to full path for WP 5.1.0+. Previous true|false. */ | |
| 0 ? define( 'WP_DEBUG_LOG', SITE_LOG_PATH ) : ''; | |
| /** Use development versions of core CSS and JS files. */ | |
| 0 ? define( 'SCRIPT_DEBUG', false ) : ''; | |
| /** Use the site debug log. */ | |
| 0 ? define( 'SITE_USE_DEBUG_LOG', true ) : ''; | |
| } | |
| /** The URL to the root of the site (not the core files). Required. */ | |
| define( 'SITE_ROOT_URL', SITE_PROTOCOL . SITE_SERVER_NAME ); | |
| /** Where the core WordPress files reside, relative to site root. */ | |
| 1 ? define( 'WP_SITEURL', SITE_ROOT_URL . SITE_CORE_DIR ) : ''; | |
| /** Where the site pages and posts reside (NOT the core files). */ | |
| 1 ? define( 'WP_HOME', SITE_ROOT_URL ) : ''; | |
| /** Where the core WordPress files reside, relative to site root. */ | |
| 1 ? define( 'WP_SITEURL', SITE_PROTOCOL . SITE_SERVER_NAME . SITE_CORE_DIR ) : ''; | |
| /** This is set to the full url, plus the '/b' directory. */ | |
| 1 ? define( 'WP_CONTENT_URL', SITE_ROOT_URL . SITE_BIN_DIR ) : ''; | |
| /** Default: 'wp-content/mu-plugins' (Must Use Plugins URL) */ | |
| 1 ? define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . SITE_REQUIRED_DIR ) : ''; | |
| /**#@+ | |
| * Authentication Unique Keys and Salts. | |
| * | |
| * @link https://api.wordpress.org/secret-key/1.1/salt/ | |
| * | |
| * Change these to invalidate existing cookies. This will force users to log | |
| * in again. | |
| * | |
| * @since 2.6.0 | |
| */ | |
| /**#@-*/ | |
| /** Unique for each install, but same between local, staging and prodution. */ | |
| $table_prefix = 'wp01a_'; | |
| /* That's all, stop editing! Happy publishing. */ | |
| /** 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' ); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note the logic used to progress from the local environment, through staging, to production.