开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜