Title: update_archived
Published: April 25, 2014
Last modified: May 20, 2026

---

# update_archived( int $id, string $archived ): string

## In this article

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

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

Updates the ‘archived’ status of a particular blog.

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

 `$id`intrequired

Blog ID.

`$archived`stringrequired

The new status.

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

 string $archived

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

    ```php
    function update_archived( $id, $archived ) {
    	update_blog_status( $id, 'archived', $archived );
    	return $archived;
    }
    ```

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

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

| Uses | Description | 
| [update_blog_status()](https://developer.wordpress.org/reference/functions/update_blog_status/)`wp-includes/ms-blogs.php` |

Updates a blog details field.

  |

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

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

## User Contributed Notes

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