Home › Forums › Backend Issues (wp-admin) › where does AFC store data in the database?
Doing some tests migrating a sub-domain in multisite to become the primary domain. (Completely bizarre that this isn’t a native feature, but that’s another topic.)
On my first try, everything worked except images uploaded using an ACF field group.
I did a search/replace in the wp_229_posts table (229 being the site ID) and got no results. All images broken. Led me to believe that ACF was storing links to images somewhere else? That possible?
It depends on where the fields are attached.
fields on posts are stored in postmeta table
fields on terms are stored in termeta table
fields on users are stored in usermeta table
fields on options pages are stored in the options table
Revisiting this topic, as I’m working on another project where I have to find specific data in ACF fields.
So I have a wysiwyg field with a key named field_59c990d0410b8. When using phpmyadmin, all I can find is one record for the settings for that field, not the actual content.
Is the content stored somewhere else? In post_content perhaps?
Are there any guides for doing searches on content entered into ACF? I couldn’t find anything, just lots of highly specific questions. So might be helpful to have a guide explaining this, since ACF content is not searchable using wordpress itself.
Not sure what you are referring to.
a field is a post type. Most of the settings for the field are stored in post_content. Some field settings are stored in post meta.
For the actual field, there is one entry that is "_{$feild['name']}"
that contains the field key of the field that is associated with $field['name']
and this is where you will find the content for the field.
Unless we’re talking about guberbuggutenberg. In this case I believe that all of the content is actually stored in post_content for the post.
Excellent! That really helps. Wouldn’t have guessed that it worked this way and was critical to being able to do a database search, since the standard wordpress search (in posts or custom posts) can’t see into the data in your fields.
Would be LOVELY if there was an admin tool for this. 😉
Screenshot attached to anyone looking at this in the future:
The topic ‘where does AFC store data in the database?’ 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.