{"id":305,"date":"2020-08-25T16:25:32","date_gmt":"2020-08-25T16:25:32","guid":{"rendered":"https:\/\/demo.wpartisan.net\/developmentsite\/whats-the-difference-between-wordpress-address-url-and-site-address-url\/"},"modified":"2024-11-04T04:06:52","modified_gmt":"2024-11-04T04:06:52","slug":"whats-the-difference-between-wordpress-address-url-and-site-address-url","status":"publish","type":"quick-tips","link":"https:\/\/demo.wpartisan.net\/developmentsite\/whats-the-difference-between-wordpress-address-url-and-site-address-url\/","title":{"rendered":"What\u2019s the Difference Between WordPress Address (URL) and Site Address (URL)?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In your WordPress Admin area, under Settings > General Section, you can see two input fields named WordPress Address (URL) and Site Address (URL) which will auto-populate with the value when you set up a WordPress site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">site_url() function returns the WordPress Address (URL) value. It refers to the directory where you have all WordPress files and folders. For example, if your domain name is https:\/\/example.com and the site_url() function returns https:\/\/example.com\/blog, it means your WordPress is installed from the blog directory. So your admin page URL will be like this: https:\/\/example.com\/blog\/wp-admin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">home_url() function returns the Site Address (URL) value. It means that where you have set your homepage. For example, 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 page URLs followed by this like https:\/\/example.com\/homepage\/about. But your admin URL will be like this( https:\/\/example.com\/wp-admin ). It will not be like this( https:\/\/example.com\/homepage\/wp-admin ).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often face a question about the difference between home_url() and site_url(). Let&#8217;s explain it with an example.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"tags":[],"topics":[45],"class_list":["post-305","quick-tips","type-quick-tips","status-publish","hentry","topics-wordpress"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"WPArtisan","author_link":"https:\/\/demo.wpartisan.net\/developmentsite\/author\/developmentsiteauth\/"},"uagb_comment_info":0,"uagb_excerpt":"I often face a question about the difference between home_url() and site_url(). Let's explain it with an example.","_links":{"self":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/quick-tips\/305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/quick-tips"}],"about":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/types\/quick-tips"}],"author":[{"embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/comments?post=305"}],"wp:attachment":[{"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/tags?post=305"},{"taxonomy":"topics","embeddable":true,"href":"https:\/\/demo.wpartisan.net\/developmentsite\/wp-json\/wp\/v2\/topics?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}