DEV Community 👩‍💻👨‍💻

Matthias Andrasch
Matthias Andrasch

Posted on

Starting to work with ACF Local JSON (and git) 🤔

The Advanced Custom Fields plugin offers a great feature called Local JSON. The idea behind it is that every field group change in the dashboard is automatically saved in a .json file for the field group. This .json file can then be committed via git and be pulled on a live site (e.g. in your child theme).

Image description

You can then hide the ACF field group editor completely on your WordPress live / production site and no one can by mistake change important field group data. This is important because you might use an ACF field in your templates and when someone changes your field name (by mistake), the template won't work anymore of course.

ACF Local JSON also allows you to see who changed which field group (and when) via git. Great!

The local development already works fine, but I'm in the process of solving the deployment step. I got an helpful answer in the ACF forum regarding that, but more experimenting is needed:

https://support.advancedcustomfields.com/forums/topic/git-deploy-workflow-for-acf-local-json-only-sync-on-production/

Resources I need to check:

Stay tuned! ;-)

PS: Would be great to have a similiar feature for the Custom Post Types UI plugin!

Top comments (0)

🌙 Dark Mode?!

 
Turn it on in Settings