Skip to content

Instantly share code, notes, and snippets.

@Ephigenia
Created October 18, 2011 11:35
Show Gist options
  • Select an option

  • Save Ephigenia/1295225 to your computer and use it in GitHub Desktop.

Select an option

Save Ephigenia/1295225 to your computer and use it in GitHub Desktop.
wordpress-env-config-username-example
define('WP_HOME','http://'.$_SERVER['HTTP_HOST'].'/wordpress/path/');
define('WP_SITEURL', WP_HOME);
$envUsername = strtolower(get_current_user());
$envConfigFilename = dirname(__FILE__).'/wp-config-'.$envUsername.'.php';
if (file_exists($envConfigFilename)) {
require $envConfigFilename;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment