Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress wp-config.php hack to force a WP site to respond to whatever domain you access it from, database wp_options be damned. Thanks Rackspace Cloud Sites!
// Anywhere in the wp-config.php before the last include
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.