Posted on 16.03.2013 by

For those of you who do WordPress development, I don’t need to tell you how challenging it can be to manage version control for both your WordPress theme files AND your database.  I’ve been experimenting with several approaches and here is my current set up.  Let me know what you have figured out.

Use Github for Theme Files

  • No big mystery here. I am using Git for the code repository
  • The only customization here is in the .gitexclude file where I exclude pretty much everything but the theme files
  • We use multiple branches: a master branch for stable code and then a dev branch with child branches for various ‘releases’.

Use WP-Migrate-Pro to Migrate Database

The team at Delicious Brains has a great WordPress database migration plug in. Once you install on the source and target sites, you can push/pull databases from one environment to another. It works great, and depending upon the size of your database, can take anywhere from several minutes to close to an hour.

Next Steps

To finish this workflow, I need a way to ‘off-load’ the /wp-content/images/ and /wp-plugins folders. IMO, there is no reason to keep either of these assets in the repository nor should a new developer have to download those massive folders to their local environment.

  • For the /wp-content/images/ folder, I am considering using the WP Offload Media plug in by DeliciousBrains. The images are offloaded to Amazon S3 so that would take care of having to zip up the images folder for developers (quite a pain and time consuming).

You must be logged in to post a comment.