• Hello there!

    What if I update for example Woocommerce (or something else) on a localhost install and then put the new files in GIT. But in the update process the plugin made database changes (for example new settings) what happens to those changes if I put the files online with git. Does the plugin understand that the database changes still have to be made or not?

    Or is it better to make the updates in the online environment? And push it back to GIT.

    Small other question: How do you guys work with GIT? Do you guys put the whole WordPress core in GIT or just the theme and maybe some plugins?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Howdy,

    First, it depends on how the plugin is developed. If the plugin versions the database by saving something like a “dbversion” setting whenever the database is updated, then you should be okay. You would go to your production environment and likely find a message that “Your XYZ plugin tables need updated.” The plugin would then execute some db migration script they’d written for that upgrade purpose.
    (This is the way it should be done by plugin devs…)

    If the plugin is not designed like that, then you would be best to just do the updates in the online environment.

    Second, I prefer to have separate git repos for each theme and plugin. As projects age, you’ll probably find it easier to keep things organized. It also makes it much easier to work collaboratively with other developers.

    Hope this helps.

    Thread Starter JohanvdMolen

    (@pixelive)

    Thanks for your comment ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Updating plugins & git’ is closed to new replies.