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?
git
? How did agit commit
change your database? Git only tracks files, I think there are significant gaps in your question with differences between what you're doing and what you've written driven by some assumptions nobody else is aware of. Try and assume we have no idea what you're talking about, and rid yourself of the idea there is a "standard" way of doing things that you tried to follow, and just explain your system in its entiretygit
. When I update a plugin on systemA
, the plugin will update the code and the database, but only the code will be ingit
. When I sync now with hostB
I will update the code usinggit
, but not the database. And as the code has been synced with the most current version of the plugin I'm afraid, that the plugin will not try to update the database and I'll have a inconsistency.A
but not onB
? Are you doing something hacky that would mess with it? If there is an inconsistency why's that an issue? Just pull down the production data to your local, local environments regularly "desync". It sounds like what you needed to do was just do it and see what happens, but you wanted reassurance instead