Home Forums Feature Requests Migrations



  • When we are developing a site, we might have 3-4 versions of the site on different enviroments with different databases. This is a problem when syncing with git sence the acf settings are not theme specific, but database specific.
    It would be great if the fields structure could somehow be stored with the theme so it can be commited so that the fields and theme updates can be commited and deployed together.

    Maybe some kind of version of migrations like in Laravel?

  • Hi @weblyan

    You can use the Export to PHP feature to keep your field data in your theme. This allows git to sync the fields!


  • I’ve used this featured but I’m not 100% satisfied with this feature. It does help with binding field logic to a theme, but it does not help with version control and local development. This feature is a one way export. Once it has been exported and transfered to another enviroment, I can not easily change or extend these settings. Also, this method doesn’t work well with merging two different setups that has been developed separatly.

    Maybe an alternative option to store all, or maybe just a fieldset’s, structure as a json document (like composer) in the active theme, instead of the database.

  • Hi @weblyan

    Thanks for the feedback. You may be pleased to hear that ACF5 (soon to be released) contains an auto read/write JSON feature.

    Each field group writes a separate .json file, so you can add a new field group on site b and then pull it down to site a, etc.

    Hope that helps.


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Migrations’ is closed to new replies.