Home › Forums › General Issues › Migrating to ACF
First, I would like to understand why you choose to use two kinds of field names, one you set “field_23h9h23j” and other we set our name “product-price”. What was the problem you found to use this solution?
I’m asking this because I wanted to upgrade a website to use this plugin but I got a problem when the ACF do not recognized the old fields just because ACF doesn’t found the fields “field_987sasdnkj”. In this case, what do you suggest to migrate to ACF?
I will attempt to answer the first question. ACF uses two types of field names in order to associate the field with its object; as you see in the postmeta table of your DB, only the value is saved (in “meta_value”) for the posts’ field name (in “meta_key”). So, in order to access the rest of the field object (e.g. “label”, “format”, “type”, “choices”, etc.), ACF must be able to look this up using a unique identifier (the key). This ensures that post meta is stored the way same as (and hence, compatible with) native WP meta. So, when ACF gets a field, it looks for the meta_key with the same name as the requested field but prefixed with an underscore – this gives it the key that allows it to find the rest of the object.
Maybe a migration tool can be difficult to implement, but looking at ACF, the possible solution to this could be implementing a function just to recheck the fields inside each group and make corrections on metadata. A button on the page that list the groups could start this tool.
Workflow to migrate content could be:
This is my idea, I want to listen your opinion, maybe you already have a simple solution to this.
The topic ‘Migrating to ACF’ is closed to new replies.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.