Wednesday, February 4, 2015

WordPress: Defined Home and Site Url

WP_SITEURL, defined since WordPress Version 2.2, allows the WordPress address (URL) to be defined. The value defined is the address where your WordPress core files reside. It should include the http:// part too. Do not put a slash "/" at the end. Setting this value in wp-config.php overrides the wp_options table value for siteurl and overrides the WordPress address (URL) field in the Administration > Settings > General panel when logging in using wp-login.php. It will _not_ update your Home url. Read more about this in depth in the link provided in the Note field:

WP_HOME is another wp-config.php option added in WordPress Version 2.2. Similar to WP_SITEURL, WP_HOME overrides the wp_options table value for home but does not change it permanently. home is the address you want people to type in their browser to reach your WordPress blog. It should include the http:// part and should not have a slash "/" at the end.

If you won't change the Database value though, so need manually add WP_HOME and WP_SITEURL in wp-config

define('WP_HOME','http://mytest.com');
define('WP_SITEURL','http://mytest.com'); 

No comments:

Post a Comment