Skip to content

Instantly share code, notes, and snippets.

@maylogger
Created September 18, 2011 15:27
Show Gist options
  • Save maylogger/1225164 to your computer and use it in GitHub Desktop.
Save maylogger/1225164 to your computer and use it in GitHub Desktop.
wp-config.php db setting for heroku
// ** MySQL settings - You can get this info from your web host ** //
$db = parse_url($_ENV["DATABASE_URL"]);
/** The name of the database for WordPress */
define('DB_NAME', trim($db["path"],'/'));
/** MySQL database username */
define('DB_USER', $db["user"]);
/** MySQL database password */
define('DB_PASSWORD', $db["pass"]);
/** MySQL hostname */
define('DB_HOST', $db["host"]);
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment