Support

Account

Home Forums ACF PRO Migrating from ACF Pro as a plugin to with the theme

Helping

Migrating from ACF Pro as a plugin to with the theme

  • So in my latest project I started using ACF Pro within the theme and using json files as opposed to as a plugin. Basically it changed my life. So now I am looking at retrofitting some projects I did a few months back. Its a bit of a scary proposition so I wanted to be clear on the process and see if there is anything I am missing.

    So I believe the best first step is to actually generate the JSON files locally. I sync up the remote and local db and once I set up the the acf filters correctly to save the json, I then open each group and click update. This saves the json file for that group in my acf-json folder and it seems to work nicely.

    I think once I push up my theme, acf will opt for the fields in the json storage over fields in the database.

    So the part I am iffy about is removing the database version of the fields from the production server. Once I push up the changes with the fields as json and other configurations, the production server will get its fields from the json. But it will still have old fields in the database. Is this ok? Can I just ignore this as I am blocking editing the fields in production anyway using

    // 3. Hide ACF field group menu item
    if(WP_ENV !== 'development'){
    	add_filter('acf/settings/show_admin', '__return_false');
    }

    Any help would be appreciated!

  • Hi @stueynet,

    Thanks for the post.

    The fields can still remain in the db but every time some field changes will be made in the admin, the changes will be effected in the json files.

    Ideally the files in the acf-json folder will be loaded first but you can always create a new load point but this will bear higher priority before the field settings from the db are loaded.

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

The topic ‘Migrating from ACF Pro as a plugin to with the theme’ is closed to new replies.