Wordpress SITE_URL in wp-config.php is not an overriding database setting

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.

+3
source share
1 answer

Try customizing the content catalog for your plugins and themes.

define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');

http://codex.wordpress.org/Editing_wp-config.php

+2
source

All Articles