Created
December 11, 2015 21:06
-
-
Save zaus/9b52909f80bb01986001 to your computer and use it in GitHub Desktop.
Revisions
-
zaus created this gist
Dec 11, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ switch($_SERVER['HTTP_HOST']) { case 'wp.sandbox:81': define('DB_NAME', 'YOURDB');/** The name of the database for WordPress */ define('DB_USER', 'YOURUSER');/** MySQL database username */ define('DB_PASSWORD', 'YOURPASS');/** MySQL database password */ define('DB_HOST', 'localhost');/** MySQL hostname */ // may need to use actual computer ip in some cases break; default: define('DB_NAME', 'YOURDB');/** The name of the database for WordPress */ define('DB_USER', 'YOURUSER');/** MySQL database username */ define('DB_PASSWORD', 'YOURPASS');/** MySQL database password */ define('DB_HOST', 'localhost');/** MySQL hostname */ // may need to use actual computer ip in some cases break; } /** 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', ''); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); // http://fuelyourcoding.com/simple-debugging-with-wordpress/ if(!function_exists('_log')): function _log( $message ) { $message = func_get_args(); if( WP_DEBUG !== true ) return; $e = new Exception(); $backtrace = str_replace(getcwd(), '', $e->getTraceAsString()); // do we print the whole backtrace? or just the first line if($message[0] !== 'backtrace') $backtrace = explode("\n"/*PHP_EOL*/, $backtrace)[0]; error_log(sprintf('DEBUG AT: %s%s%s' , $backtrace , PHP_EOL , print_r( count($message) == 1 ? $message[0] : $message, true ) )); } endif;