I’ve been looking for a way to optimise the WordPress development workflow we use at Digital Leap and have constantly hit walls when it comes to managing database changes from dev machines to staging, production, and then all the way back (as we make changes to code and content at each stage).

When it comes to managing code changes, using version control tools like Git or SVN (actually, don’t use SVN) is quite common and there are robust and reliable. When it comes to database changes, on the other hand, merging databases from multiple places is quite tricky. There are a few projects that try and allow for syncing of production and live sites (WP Migrate Pro is a great example) but, from what I understand, it doesn’t cater for merge conflicts.

If you imagine a basic workflow in a team environment, a developer would do some custom code in his dev environment whilst the front-end dev is busy with setting up the theme and pages. Once they’re both done, they have to synchronise and merge what they’ve done and put it onto a staging site for someone to do some QA on it. The major issue is when the person makes changes on the staging site and a developer and / or designer has made changes in their dev environments. This is where VersionPress comes into the picture.

Possible WordPress Development Workflow with VersionPress

At this stage, I’m not sure if it is possible – I’ll be honest with you. VersionPress is still very young and because of that, it’s still lacking very important features. However, the major functionality of merging database changes is there which, I would say, is the most important part of a solution.

At this stage, you can easily merge changes using WP-CLI (this makes it less of a user-friendly solution) and also clone a WordPress website into another staging site on the same server. The fundamental part that is missing, is being able to do this across environments like production, staging (on another server) and dev machines.

I think a possible solution (this is where my limited knowledge of Git shows) is to allow the VersionPress Git repo (yes, it is reliant on Git) to have a remote to your central Git server like Github, Bitbucket etc. Although, I could imagine that this carries its own complexities.

This is no solution but it’s definitely a couple of steps forward and at least allows developers to develop features into websites whilst still being able to bounce back into production copies.

If you’re reading this and going “There is a much easier way to do this!” then I’d love to hear from you!

Published by Seagyn

I'm a passionate "Maker of Things" and build as often as I can. I build things with mainly with PHP and a little Javascript. View more posts

Join the Conversation

1 Comment

  1. Hi, we’re likely not going to implement any network related stuff that would directly connect different (production, stating, dev) machines but will depend on Git and its network protocols. Synchronizing via GitHub / Bitbucket is actually a very good idea, we use this workflow on some of our internal sites and it works well, though it requires some manual WP-CLI commands / scripts for the time being. But the core technology shouldn’t need to change much from what is in VersionPress already today.

    Thanks,
    Borek

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

',a='
';return t.replace("ID",e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement("iframe"),t="https://www.youtube.com/embed/ID?autoplay=1";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute("src",t.replace("ID",this.dataset.id)),e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","1"),this.parentNode.replaceChild(e,this)}document.addEventListener("DOMContentLoaded",function(){var e,t,a=document.getElementsByClassName("rll-youtube-player");for(t=0;t