To facilitate the deployment of my Wordpress site, I added the following code to wp-config.php:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
I understand that this should override any values stored in the database, but when I look at the source code, I see that wherever I am:
<?php bloginfo('template_directory'); ?>
... it prints the domain from the database value, not the one located in wp-config.
source
share