Handle Multiple Domains with Wordpress

This enables the use of multiple domains with a single wordpress instance. This is handy when developing local but using something like Laravel Valet, Lando, or ngrok to open a tunnel to your local machine for testing.

Edit wp-config.php and place the following directly after the `$table_prefix` setting:


/*
 * Handle multi domain into single instance of wordpress installation
 */
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);