Trigger Plugin database update after git pull

I have a couple of WordPress websites that I’m maintaining. The websites are on various git repositories (one for each site) with individual remotes.

Currently when there is a plugin update available etc I do the following:

  • Sync up “non git” content (wp-content/uploads and database) with my local machine (if it has been a while since I’ve worked on that website)
  • Update the plugin, theme WordPress, etc
  • Add the changed files to git, commit and push them to the remote
  • Login to the remote machine and git pull the changes

This works most of the time, but an edge case is being left out that I’m encountering:

If a plugin updates the database while upgrading , how can I run that database upgrade when/after I pull the changes?

Keep in mind that the live website by the time I pull the changes, has already changed.

Sorry if this question has been answered before.

0

Leave a Comment