int $postid, WP_Post $post )
Fires immediately before a post is deleted from the database.
Take note, by the time the hook triggers, the post comments and metadata would have already been deleted. Use the before_delete_post hook to catch post deletion before that.
View all references
do_action( 'delete_post', $postid, $post );
Let’s suppose you have a plugin that, for one reason or another, stores its own post metadata in a separate database table called codex_postmeta. One of the ways you can achieve synchronization is to be made aware when a post is deleted so that you can replicate the changes yourself.