Last active
March 10, 2019 13:54
-
-
Save bhubbard/6056768 to your computer and use it in GitHub Desktop.
A Custom Template for wp-config.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 | |
################################################################################ | |
// Custom WP-CONFIG Template. | |
################################################################################ | |
################################################################################ | |
// For Quick Client Reference | |
################################################################################ | |
// Client Name: | |
// Salesforce URL: | |
// DB External Hostname: | |
// PHP MyAdmin URL: | |
################################################################################ | |
// Database Settings | |
################################################################################ | |
// Check for Local Config | |
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { | |
define( 'WP_LOCAL_DEV', true ); | |
include( dirname( __FILE__ ) . '/local-config.php' ); | |
} else { | |
define( 'WP_LOCAL_DEV', false ); // Disable Local Dev | |
define('DB_NAME', ''); // Database Name | |
define('DB_USER', ''); // MySQL User | |
define('DB_PASSWORD', ''); // MySQL Password | |
define('DB_HOST', ''); // MySQL Hostname | |
} | |
$table_prefix = 'wp_'; // Database Table prefix. | |
################################################################################ | |
// You almost certainly do not want to change these | |
################################################################################ | |
define('DB_CHARSET', 'utf8'); // MySQL Charset | |
define('DB_COLLATE', ''); | |
################################################################################ | |
// Salts for Security | |
// You can generate these at https://api.wordpress.org/secret-key/1.1/salt/ | |
################################################################################ | |
define('AUTH_KEY', ''); | |
define('SECURE_AUTH_KEY', ''); | |
define('LOGGED_IN_KEY', ''); | |
define('NONCE_KEY', ''); | |
define('AUTH_SALT', ''); | |
define('SECURE_AUTH_SALT', ''); | |
define('LOGGED_IN_SALT', ''); | |
define('NONCE_SALT', ''); | |
################################################################################ | |
// Main Site Settings | |
################################################################################ | |
// define('WP_SITEURL', 'http://www.domain.com'); // Set Site URL | |
// define('WP_HOME', 'http://www.domain.com'); // Set Home URL | |
// define('DOMAIN_CURRENT_SITE', 'http://www.domain.com'); // Set Domain Current Site | |
define('WP_CONTENT_URL', '/wp-content'); // Path to content folder | |
define('WP_CONTENT_URL', '/wp-content/plugins'); // Path to Plugins | |
// define('COOKIE_DOMAIN', 'www.yourwebsite.com'); // Set Cookie for Domain | |
// define('TEMPLATEPATH', ''); // Path to Template | |
// define('STYLESHEETPATH', ''); // Path to Stylesheet | |
define('WP_POST_REVISIONS', 2 ); // Set max revisions (false to disable) | |
define('EMPTY_TRASH_DAYS', 15 ); // 15 days | |
// define('AUTOSAVE_INTERVAL', 240 ); // Post save every X number of seconds | |
define('DISALLOW_FILE_EDIT', true); // Disable Plugin & Editor Access | |
// define('DISALLOW_FILE_MODS', true); // Disable Plugin & Theme Update/Install | |
define('WP_MEMORY_LIMIT', '64M'); // Set Memory Limit to 64MB | |
################################################################################ | |
// Language Settings | |
################################################################################ | |
define('WPLANG', ''); // Language - default is English | |
################################################################################ | |
// Cache Settings | |
################################################################################ | |
define('WP_CACHE', true); // Enable WP Object Cache (wp-content/cache) | |
// WP Super Cache | |
// define( 'WPCACHEHOME', 'PATH to SUPER CACHE' ); //Added by WP-Cache Manager | |
// W3 Total Cache | |
################################################################################ | |
// Plugin Settings | |
################################################################################ | |
// Contact Form 7 | |
// define('WPCF7_LOAD_JS', true); // load javascript | |
// define('WPCF7_LOAD_CSS', true); // load css | |
// define( 'WPCF7_SHOW_DONATION_LINK', false ); // disable donation link | |
// NextGenGallery | |
// define('NGG_SKIP_LOAD_SCRIPTS', false); // disable javascript | |
// define('NGG_SKIP_LOAD_STYLES', false); // disable css | |
// Gravity Forms | |
// define("GF_LICENSE_KEY", "YOUR-LICENSE-KEY-HERE"); // Define License key | |
// Define WordPress.com API Key | |
// define('WPCOM_API_KEY','your-key'); | |
// Define WP 101 Key | |
// define('WP101_API_KEY', 'XXXXXXXXXXXX'); | |
// Define Soliloquy Key | |
// define( 'SOLILOQUY_LICENSE_KEY', 'your_license_key' ); | |
// Define Slide Deck Key | |
// define('SLIDEDECK_LICENSE_KEY', 'XXXXXX'); | |
// Define Yoast License Keys | |
// define( 'WPSEO_LOCAL_LICENSE', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ); | |
// define( 'WPSEO_VIDEO_LICENSE', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ); | |
// define( 'WPSEO_NEWS_LICENSE', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ); | |
// define( 'JETPACK_SIGNATURE__HTTPS_PORT', XXXXXX ); | |
################################################################################ | |
// Developer Settings | |
################################################################################ | |
// Troubleshooting Tools | |
################################# | |
define('WP_DEBUG', false); // Wordpress Debug Mode | |
define('WP_DEBUG_LOG', false); // Creates debug.log in wp-content | |
// define( 'WP_LOCAL_DEV', true ); // Local Dev Mode | |
// Use dev versions of core JS & CSS (only needed if you are modifying these core files) | |
define('SCRIPT_DEBUG', false); // Debug for scripts | |
define('SAVEQUERIES', false); // Save MySQL Queries | |
define('WP_ALLOW_REPAIR', false); // Auto DB Optimization - http://example.com/wp-admin/maint/repair.php | |
// SSL MODE | |
################################# | |
// define('FORCE_SSL_LOGIN',true); | |
// define('FORCE_SSL_ADMIN',true); // Force SSL for WordPress Admin | |
// $_SERVER['SERVER_PORT'] = 443; // Use when using CloudFlare for SSL | |
// define( 'JETPACK_CLIENT__HTTPS', 'NEVER' ); // Jetpack never HTTPS | |
/** | |
* Solve the redirect loop issue when redirecting all traffic to HTTPS in CloudFlare | |
* @see https://wordpress.org/plugins/cloudflare-flexible-ssl/ | |
* @see https://support.cloudflare.com/hc/en-us/articles/203487280--How-do-I-fix-the-infinite-redirect-loop-error-after-enabling-Flexible-SSL-with-WordPress- | |
*/ | |
/* | |
if ( isset( $_SERVER['HTTP_CF_VISITOR'] ) && strpos( $_SERVER['HTTP_CF_VISITOR'], 'https' ) !== false ) { | |
$_SERVER['HTTPS'] = 'on'; | |
} | |
*/ | |
// Correct IP from CloudFlare | |
/* | |
if(array_key_exists('HTTP_CF_CONNECTING_IP', $_SERVER)){ | |
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
} | |
*/ | |
// add_filter( 'jetpack_photon_reject_https', '__return_false' ); | |
// define( 'JETPACK_STAGING_MODE', true); | |
// Disallow unfiltered_html for all users, even admins and super admins | |
// define( 'DISALLOW_UNFILTERED_HTML', TRUE ); | |
// Allow uploads of filtered file types to users with administrator role | |
// define( 'ALLOW_UNFILTERED_UPLOADS', TRUE ); | |
// Compression for JS and styles | |
################################# | |
// define( 'CONCATENATE_SCRIPTS', FALSE ); // activate concantenate scripts | |
// define( 'COMPRESS_SCRIPTS', FALSE ); // activate JS compression | |
// define('WP_HTTP_BLOCK_EXTERNAL', true); // Block External Connections | |
// define (‘WP_ACCESSIBLE_HOSTS’, ‘api.wordpress.org, akismet.com, netdna.bootstrapcdn.com, ajax.googleapis.com, cdnjs.cloudflare.com, imforza.comm w,sharethis.com, idxco.com, google-analytics.com’); // Whitelist for External Connections | |
// Allow Multisite | |
################################# | |
// define( 'WP_ALLOW_MULTISITE', TRUE ); | |
// define( 'SUBDOMAIN_INSTALL', true ); | |
// JetPack | |
################################# | |
// define( 'JETPACK_DEV_DEBUG', true); | |
// Cron Settings | |
################################# | |
// define('DISABLE_WP_CRON',true); | |
// define('WP_CRON_LOCK_TIMEOUT',60); | |
################################################################################ | |
// Load a Memcached config (if we have one) | |
################################################################################ | |
if ( file_exists( dirname( __FILE__ ) . '/memcached.php' ) ) | |
$memcached_servers = include( dirname( __FILE__ ) . '/memcached.php' ); | |
################################################################################ | |
// Specific FTP and SSH info (hopefully not needed) | |
################################################################################ | |
// define('FS_METHOD', 'direct'); // Force Direct Install | |
// define('FS_METHOD', 'ftpext'); | |
// define('FTP_BASE', '/path/to/wordpress/installation/'); | |
// define('FTP_CONTENT_DIR', '/path/to/wp-content/'); | |
// define('FTP_PLUGIN_DIR ', '/path/to/wp-content/plugins/'); | |
// define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub'); | |
// define('FTP_PRIKEY', '/home/username/.ssh/id_rsa'); | |
// define('FTP_USER', 'username'); | |
// define('FTP_PASS', 'password'); | |
// define('FTP_HOST', 'ftp.example.org:21'); | |
// define('FTP_SSL', false); | |
define( 'WPE_POPUP_DISABLED', true ); // Disable WP Engine PopUp | |
################################################################################ | |
// Bootstrap Wordpress | |
################################################################################ | |
/** 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