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?

up vote 0 down vote accepted

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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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