Is it possible to save/modify a post without calling the “save_post” action hook?

TL;DR: No, you can use save_post. Unless you consider programmatic modification of only metadata “modifying a post”.


There (theoretically) is a way of modifying a post without triggering the save_post action hook: Direct modification of the database.

But for one no plugin or theme author in his right mind would go that route and for another it would circumvent all other possible action hooks as well.

The other hooks you mention are for entirely different use-cases:
update_post_meta or updated_postmeta run only when metadata is changed, i.e. not when only title or content are edited.
transition_post_status will not run when a published post is merely edited.

Iff you consider programmatic updates of post metadata a modification of the post itself you will indeed have to tie into the update_post_meta hook or the like as well. The update_post_meta() function calls update_metadata() (source on trac) which will run several action hooks (see linked source), but indeed not save_post.

Leave a Comment