Create Local Version Control in your WordPress Plugin

We think its best to start this post of with an example. Lets say you develop and publish version 1 of a plugin, and within this first version you create a custom table in the WordPress database. Your plugin becomes successful and you release version 2 with changes to the table schema. Finally you release version 3 with more changes to the table schema and add a new table that relates to the first table.

What is the Problem and How can we solve it?

If you don’t have local version control, then you cant know what version of your plugin the client currently has installed on their site. This is a problem because you have to make different changes in your plugin depending on which version the client currently has and which one they are updating to.  Look at the follow table schemas below for each hypothetical version of your plugin. Continue reading “Create Local Version Control in your WordPress Plugin”