Skip to content

Instantly share code, notes, and snippets.

@jamesmrobinson
Last active January 25, 2017 04:52
Show Gist options
  • Save jamesmrobinson/07021a806e12d3e6ad56753ebedd25bf to your computer and use it in GitHub Desktop.
Save jamesmrobinson/07021a806e12d3e6ad56753ebedd25bf to your computer and use it in GitHub Desktop.
A more useful wp-config file
<?php
// ** MySQL settings
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');
// ** DEV DEBUG settings
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
define('CONCATENATE_SCRIPTS', false);
<?php
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
define( 'WP_LOCAL_DEV', true );
} else {
// ** MySQL settings
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');
// ** LIVE DEBUG settings
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
}
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
$table_prefix = 'wp_';
// ** SALT 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');
// ** SITE LOCATION
// define('WP_HOME','http://example.com');
// define('WP_SITEURL','http://example.com');
// ** MISCELLANY
// define('EMPTY_TRASH_DAYS', 30);
// define('WP_POST_REVISIONS', 3);
// define('WP_MAX_MEMORY_LIMIT', '256M');
// define('IMAGE_EDIT_OVERWRITE', true);
// define( 'WP_CACHE', true );
// define( 'WP_ALLOW_REPAIR', true ); // Then visit /wp-admin/maint/repair.php
// ** WP-CONTENT REWRITE
// define('WP_CONTENT_FOLDERNAME', 'assets');
// define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;
// define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
// define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
// ** CONTACT FORM 7 settings
// define ('WPCF7_LOAD_JS', false); // Added to disable JS loading
// define ('WPCF7_LOAD_CSS', false); // Added to disable CSS loading
// define ('WPCF7_AUTOP', false); // Stops the Auto P tag formatting of the forms
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