get_site_url ( $blog_id = null, $path = '', $scheme = null )

  • (int|null) blog_id Optional. Site ID. Default null (current site).
  • (string) path Optional. Path relative to the site URL. Default empty.
  • (string|null) scheme Optional. Scheme to give the site URL context. Accepts 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. Default null.
  • (string) Site URL link with optional path appended.
Defined at:


Retrieves the URL for a given site where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.Returns the 'site_url' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https', `is_ssl()` is overridden.

Related Functions

get_sitemap_url, get_site_icon_url, get_site, site_url, network_site_url

Top Google Results

User discussions

wpseek mobile