Skip to content

Instantly share code, notes, and snippets.

@th3d0g
Last active August 29, 2015 14:22
Show Gist options
  • Save th3d0g/66ba9340ca6dcb49b735 to your computer and use it in GitHub Desktop.
Save th3d0g/66ba9340ca6dcb49b735 to your computer and use it in GitHub Desktop.
Wordpress - Different DB details for local/live; works with HOSTS file set to live domain.
<?php
// Use different password if running site locally or on server.
//
if(in_array($_SERVER['REMOTE_ADDR'], array('localhost', '127.0.0.1'))) {
define('DB_PASSWORD', 'rewinded'); // Dev
} else {
define('DB_PASSWORD', 'HcoWtiebscZU0lTqZt5y'); // Live
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment