Skip to content

Instantly share code, notes, and snippets.

@roybarber
Created January 27, 2013 16:51
Show Gist options
  • Save roybarber/4649207 to your computer and use it in GitHub Desktop.
Save roybarber/4649207 to your computer and use it in GitHub Desktop.
Wordpress Config - Live Server
<?php
// Use these settings on the local server
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
// Otherwise use the below settings (on live server)
} else {
// Live Server Database Settings
define( 'DB_NAME', 'client');
define( 'DB_USER', 'client');
define( 'DB_PASSWORD', 'password' );
define( 'DB_HOST', 'localhost' );
// Overwrites the database to save keep edeting the DB
define('WP_HOME','http://yourwebsite.com');
define('WP_SITEURL','http://yourwebsite.com');
// Turn Debug off on live server
define('WP_DEBUG', false);
}
// Never use wp_ always use your own to prevent some hacks
$table_prefix = 'client_';
// Usual Wordpress stuff - Dont overide the ones you have already
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
define('AUTH_KEY', 'wordpress generated code');
define('SECURE_AUTH_KEY', 'wordpress generated code');
define('LOGGED_IN_KEY', 'wordpress generated code');
define('NONCE_KEY', 'wordpress generated code');
define('AUTH_SALT', 'wordpress generated code');
define('SECURE_AUTH_SALT', 'wordpress generated code');
define('LOGGED_IN_SALT', 'wordpress generated code');
define('NONCE_SALT', 'wordpress generated code');
define('WPLANG', '');
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment