Home › Forums › General Issues › Does hard coding ACF fields increase speed of wordpress? › Reply To: Does hard coding ACF fields increase speed of wordpress?
With ACF Pro (5) there’s also the possibility to have ACF save the fields to json files which will get loaded instead of loading from the DB (which will speed things up).
But to answer your questions
1. Yes you can delete the fields from wp-admin if you put them in a php file but it doesn’t really matter if they remain, ACF will just load them from the php file anyway. You would not loose any data if ACF fields are removed. In deleting fields or fieldgroups you’re not actually deleting anything from posts, terms, user etc. you’re just removing the GUI for working with the meta data. It’ll still be there in the database and you could retrieve them yourself using get_post_meta for example.
2. I haven’t tested too much with the php inclusion but I’m pretty sure it’d be faster. However I’d very much recommend using the JSON method instead since that’ll mean you can still easily add, remove or modify your fields without having to export and paste the new php code everytime.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.