Make ACF Faster by Caching the Fields Setting

Instead of saving the Field Groups setting into the database, you can do so in your theme folder.

Advanced Custom Fields (ACF) is a plugin to organize custom fields. If you are not familiar with it, check out their website.

Instead of saving the Field Groups setting into the database, you can do so in your theme folder.

I heavily recommend doing this because it improves the loading speed in both front-end and back-end.

1. Create /acf-json Folder in Your Theme

Create /acf-json folder in your theme

2. Done

Seriously?

Yes! now every time you save a Field Group, it will create a JSON file in that folder automatically.

For existing Field Groups, open all one by one and re-save them.

JSON files that are saved automatically

Conclusion

As stated above, you should apply this tip on all your sites that use ACF.

Not only for a performance boost, but it also helps with syncing different installations and version control it with Git.

Note: Sorry for the lack of update, it’s been a busy end of the year 🙂

Default image
Henner Setyono
A web developer who mainly build custom theme for WordPress since 2013. Young enough to never had to deal with using Table as layout.
Leave a Reply