Skip to content

Instantly share code, notes, and snippets.

/* Lets not rely on paths in the database, they can be very wrong when moving between dev/stage/live environments */
/* The following two variables are backward to my thinking, but hey, what ya gonna do? */
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . ''); // This is NOT the 'wordpress admin area' home, but the site's home
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/SECRETDIRECTORY'); // This isn't the site's URL but the WordPress admin area URL
/* MySQL settings */
switch($_SERVER['SERVER_NAME']){
// Your local machine's settings
case 'mysite.local':
define('DB_NAME', 'dev_mysite');
@derekjohnson
derekjohnson / dabblet.css
Created June 1, 2012 16:11 — forked from anonymous/dabblet.css
Styling radio buttons
/**
* Styling radio buttons
*/
label {
display:inline-block;
padding: 1em;
background: #faf;
}