Title: Managing plugin updates to database with version control
Last modified: February 17, 2018

---

# Managing plugin updates to database with version control

 *  [pinksharpii](https://wordpress.org/support/users/pinksharpii/)
 * (@pinksharpii)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/managing-plugin-updates-to-database-with-version-control/)
 * We are starting to implement a version control process for our clients’ WP sites.
   The plan is to have local environments for the sites and repositories for each
   site that house the theme files and plugin files only. This is pretty standard
   process from our understanding. We are not using any sort of version control 
   plugin and the staging and local databases will be completely separate because
   version controlling a database is very hard to manage correctly.
 * But a question has come up with when you update a plugin on local, and that plugin
   makes some modifications to the database. But when we push the changes to the
   staging server, the old plugin files are simply getting overridden by the push.
   There is never any update scripts ran like you would if you were to manually 
   update each plugin form the admin panel. So how do you manage a change to the
   database structure that a plugin makes on update when we’re only pushing files?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 3 months ago](https://wordpress.org/support/topic/managing-plugin-updates-to-database-with-version-control/#post-9983741)
 * Plugins *should* check their version and do any necessary updates if necessary.
   Some, though, put a button on the admin panel if updates are necessary (e.g.,
   WooCommece) so someone has to login to the site and click that button.
 *  Thread Starter [pinksharpii](https://wordpress.org/support/users/pinksharpii/)
 * (@pinksharpii)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/managing-plugin-updates-to-database-with-version-control/#post-9983760)
 * By “checking their version”, you mean just a conditional wrapper around some 
   block code that would or would not work depending on x database field existing?
   
   Like run this function only if we can successfully query x from the database 
   type thing? I think that makes sense. I’ve seen the Woocommerce database update
   button.
 * And if this is the case, we basically have to have our faith in the plugins that
   they are managing themselves correctly. I don’t think it’s too often that database
   structure changes that happen, but it definitely does so we need to have a plan.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 3 months ago](https://wordpress.org/support/topic/managing-plugin-updates-to-database-with-version-control/#post-9983782)
 * >  we basically have to have our faith in the plugins that they are managing 
   > themselves correctly
 * Yup.
 * Read those changelogs carefully.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Managing plugin updates to database with version control’ is closed to
new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [version control](https://wordpress.org/support/topic-tag/version-control/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/managing-plugin-updates-to-database-with-version-control/#post-9983782)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
