Trellis and WP-CLI Advanced Custom Fields

Hi!

We use Advanced Custom Fields and would like to start using https://github.com/hoppinger/advanced-custom-fields-wpcli.

How should we do to add it to our Trellis setup? I have looked in the roles/wp-cli/ folder, but I’m not sure how to do it.

All help appreciated! :slight_smile:

It’s a WordPress plugin, not a standalone WP-CLI package. Just install it how you would install any other WP plugin with Composer.

Also highly recommend avoiding that plugin altogether and using the built in acf/settings/save_json and acf/settings/load_json filters that ACF has :slight_smile:

I built a thing to make this super easy in Sage, too:

2 Likes

Ok, thanks! Why should I avoid that plugin? Is it because the same functionality already exists in ACF?

What I like with the plugin is the ability to clear the database from all ACF saved.

It springs from a general desire to avoid using too many plugins. Since the majority of your needed functionality is present in ACF, adding another plugin is just another thing to keep updated.