1

At work we primarily build our custom sites on WordPress. For how well established the system is, there still seems like no good way of managing the sql database between local/staging/live environments.

Often we will launch a site, then a few months down the line the client would like a new feature. So we then have to manage building the new feature, adding new ACF sections etc... whilst the client is still updating the live site.

Could anyone explain how they get around having to then merge these 2 databases so you aren't wiping the new data on the live site when pushing the new feature.

Any tips would be appreciated!

4
  • Do you version control your changes?
    – ishegg
    Commented Aug 16, 2017 at 21:27
  • We version control theme code etc, not the database. Should we start? Any suggested workflow? Commented Aug 16, 2017 at 21:28
  • 1
    You can use Phinx to write migrations and then run them on each server on deployment. Works great and it's fairly easy! Take a look. And yes, you should keep a dump of the database structure, so anyone can build a functioning version of the website on every commit/tag/etc
    – ishegg
    Commented Aug 16, 2017 at 21:29
  • Appreciate the help!! Thanks @ishegg I'll give it a try!! Commented Aug 16, 2017 at 21:33

0

Browse other questions tagged or ask your own question.