Title: get_current_site
Published: April 25, 2014
Last modified: April 28, 2025

---

# get_current_site(): 󠀁[WP_Network](https://developer.wordpress.org/reference/classes/wp_network/)󠁿

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#see-also)
 * [Return](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#wp--skip-link--target)

Gets the current network.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#description)󠁿

Returns an object containing the ‘id’, ‘domain’, ‘path’, and ‘site_name’ properties
of the network being viewed.

### 󠀁[See also](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#see-also)󠁿

 * [wpmu_current_site()](https://developer.wordpress.org/reference/functions/wpmu_current_site/)

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#return)󠁿

 [WP_Network](https://developer.wordpress.org/reference/classes/wp_network/) The
current network.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#source)󠁿

    ```php
    function get_current_site() {
    	global $current_site;
    	return $current_site;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/ms-functions.php#L1974)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/ms-functions.php#L1974-L1977)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#changelog)󠁿

| Version | Description | 
| [MU (3.0.0)](https://developer.wordpress.org/reference/since/mu.3.0.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/get_current_site/?output_format=md#comment-content-2415)
 2.   [Celso Bessa](https://profiles.wordpress.org/celsobessa/)  [  9 years ago  ](https://developer.wordpress.org/reference/functions/get_current_site/#comment-2415)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_current_site%2F%23comment-2415)
    Vote results for this note: 6[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_current_site%2F%23comment-2415)
 4. An importante note from the original Codex page:
 5. **Note:** [get_current_site()](https://developer.wordpress.org/reference/functions/get_current_site/)
    was inherited from MU, and is named based on the old terminology which spoke of
    multiple “blogs” on a “site”. We now speak of multiple “sites” on a “network” instead,
    but some of the old terminology still lives on in some function names. This function
    returns information about the current network. To get information about the current
    site on the network, see [get_current_blog_id()](https://developer.wordpress.org/reference/functions/get_current_blog_id/)
    and [get_blog_details()](https://developer.wordpress.org/reference/functions/get_blog_details/).
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_current_site%2F%3Freplytocom%3D2415%23feedback-editor-2415)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_current_site%2F)
before being able to contribute a note or feedback.