What is the Difference Between wp_siteurl and wp_homeurl in WordPress?

In WordPress, wp_siteurl and wp_homeurl are two important parameters that play a critical role in defining the structure and navigation of your website. Understanding the difference between these two is key to configuring your WordPress site correctly.

  1. wp_siteurl: This is the URL where your WordPress core files reside. It is the address where WordPress’s core application files are found. For example, if you’ve installed WordPress in a subdirectory of your domain like www.yourdomain.com/wordpress, then the wp_siteurl would be www.yourdomain.com/wordpress.

  2. wp_homeurl: On the other hand, wp_homeurl is the address that points to your website’s homepage, where your main content resides. This is the URL visitors use to navigate to your site. So, if your website’s home page can be accessed via www.yourdomain.com, then the wp_homeurl would be www.yourdomain.com.

Usually, when WordPress is installed in the root directory of the domain, wp_siteurl and wp_homeurl are the same. But if you have WordPress installed in a subdirectory or if you want your homepage separate from the WordPress installation directory, these two can differ.

In your WordPress configuration file (wp-config.php), you can define these two parameters as:


In this example, WP_HOME refers to wp_homeurl and WP_SITEURL to wp_siteurl.

Leave a Comment