Override the wp_siteurl and wp_home not work
So dynamically set WP_SITEURL, WP_HOME, i override the wp-config as define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘SERVER_NAME’] ); define(‘WP_HOME’, ‘http://’ . $_SERVER[‘SERVER_NAME’] ); but when i call home_url() it always return x.co.uk hostname home_url() does not make use of any WordPress constants. It uses a call to get_option( ‘home’ ). To use WP_HOME instead, short circuit get_option(): add_filter( … Read more