Title: trashed_post
Published: April 25, 2014
Last modified: February 24, 2026

---

# do_action( ‘trashed_post’, int $post_id, string $previous_status )

## In this article

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

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

Fires after a post is sent to the Trash.

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

 `$post_id`int

Post ID.

`$previous_status`string

The status of the post at the point where it was trashed.

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

    ```php
    do_action( 'trashed_post', $post_id, $previous_status );
    ```

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

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

| Used by | Description | 
| [WP_Customize_Manager::trash_changeset_post()](https://developer.wordpress.org/reference/classes/wp_customize_manager/trash_changeset_post/)`wp-includes/class-wp-customize-manager.php` |

Trashes or deletes a changeset post.

  | 
| [wp_trash_post()](https://developer.wordpress.org/reference/functions/wp_trash_post/)`wp-includes/post.php` |

Moves a post or page to the Trash

  |

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

| Version | Description | 
| [6.3.0](https://developer.wordpress.org/reference/since/6.3.0/) | Added the `$previous_status` parameter. | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## User Contributed Notes

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