Is there a single action or filter that is run when a

  • post is updated
  • option is updated
  • user is updated
  • plugin is updated
  • any other content is updated and wrote to the database


I want to be able to track all the changes I made in my development environment and save them to a file so that I can then update my live database with these patches automatically.

Is this maybe the filter I'm looking for?: https://developer.wordpress.org/reference/hooks/query/ or does anyone know of a hook that's better suited?

Or is there a plugin out there, that I haven't found yet, that does exactly this?


1 Answer 1


Seems like there's a plugin out there that does quite this!

It's VersionPress!

In this blog post is explained what they used to track all the complicated changes.

Instead of using the 'query' filter they use the option to create a db.php file in the wp-contents directory to extend $wpdb like explained in this post: wp-content/db.php : where is this file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.