I just updated some plugins (woocommerce, polylang) of a local copy of a running wordpress website. As I'm using
git I wanted to commit the changes and sync with the live-host. But the problem is, that the updates also updated the database. Now I'm a bit confused, because if I sync now with
git the database won't be updated on the live system as for example
woocommerce asks me to trigger the database update once I have updated the plugin. On the other hand, I saw in other people's
.gitignore file, that no one ignores
wp-content/plugins. I could also dump the local database and insert into the live systems, but the data is too different.
My plan right now is to update on live first, make a
git commit and sync with the local copy - if the local copy gets broken I'll pull in the database and a fresh copy from the live system. The big disadvantage here is, that for future updates your testing systems becomes the live-system, in other words, no testing before updates. You see I'm really confused about how to do that.
So my question is how to update WordPress plugins properly using
git? How do you folks handle this?