Wordpress SITE_URL in wp-config.php is not overriding database setting
In order to make my wordpress site easier to deploy I have added the following code to wp-config.php:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
It is my understanding that this should override any values stored in the database, but when I view source I see that wherever I have:
<?php bloginfo('template_directory'); ?&开发者_Go百科gt;
...it is printing out the domain from the database value, rather than the one in wp-config.
Try setting the content dir for your plugins and themes
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
http://codex.wordpress.org/Editing_wp-config.php
精彩评论