Difference between wp_siteurl and wp_home

What’s the actual difference between wp_siteurl and wp_home?

There’s a related post which doesn’t quite answer the question:

Read More

WordPress WP_SITEURL and WP_HOME values?

Related posts

Leave a Reply

2 comments

  1. WP_SITEURL is a base url for resources: images, stylesheets, etc.

    WP_HOME is where WP thinks site root url is (a base URL for links)

    Example:
    I had to integrate WP blog into my rails site, so i configured nginx to route all requests to /blog to WordPress, while all other requests went to my rails app. So I set WP_HOME to mydomain.com for WP links to work correctly, but I had to set WP_SITEURL to mydomain.com/blog for WP static assets to be found inside WP directory.

  2. Lets consider your awesome website’s domain name is –

    http://www.myawesomesite.com
    

    Now one fine day you want to start a blog at this location –

    http://www.myawesomesite.com/myniceblog
    

    Now, answering your question –

    WP_SITEURL = http://www.myawesomesite.com  //Your awesome wesbite's domain name
    WP_HOME = http://www.myawesomesite.com/myniceblog  //Your awesome blog's homepage path
    

    For further info – see this WordPress article.