Title: wp_uninitialize_site
Published: February 22, 2019
Last modified: February 24, 2026

---

# do_action( ‘wp_uninitialize_site’, WP_Site $old_site )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#changelog)

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

Fires when a site’s uninitialization routine should be executed.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#parameters)󠁿

 `$old_site`[WP_Site](https://developer.wordpress.org/reference/classes/wp_site/)

Deleted site object.

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

    ```php
    do_action( 'wp_uninitialize_site', $old_site );
    ```

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

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_uninitialize_site/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_delete_site()](https://developer.wordpress.org/reference/functions/wp_delete_site/)`wp-includes/ms-site.php` |

Deletes a site from the database.

  |

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

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

## User Contributed Notes

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