What’s the Difference Between WordPress Address (URL) and Site Address (URL)?

In your WordPress Admin area, under Settings > General Section you can see 2 input fields name WordPress Address (URL) and Site Address (URL) which will auto populated with the value when you setup a WordPress site.

site_url() function return the WordPress Address (URL) value. It means that it refer that directory where you all WordPress files and folder. EX. if your domain name is https://example.com and if the site_url() function return https://example.com/blog, it means your WordPress installed from the blog directory. So your admin pages URL will be like this: https://example.com/blog/wp-admin.

home_url() function return the Site Address (URL) value. It means that where you have set your homepage. Ex. if you set your Site Address (URL) to https://example.com/homepage and try to visit your site home page then you can see this( https://example.com/homepage ) URL on your address bar. And other pages url followed by this like https://example.com/homepage/about. But you admin URL will be like this( https://example.com/wp-admin ). Will be not like this( https://example.com/homepage/wp-admin ).

Leave a Reply

Your email address will not be published. Required fields are marked *