Home Forums ACF PRO Enter values through the database Reply To: Enter values through the database

  • It would be very difficult to add fields directly through phpMyAdmin. Each field requires to entries in the database for each post. The first has a meta_key of your field name and the value for the field. More about values in a minute. The second field has a meta key that is equal to "_{$field_name}" and the value of this is the field_key of the ACF field.

    Values for other than the basic field types can be complicated. Some of them hold arrays. Some of them hold the ID value of another WP object. So the value you insert is highly dependent on what type of field you’re adding data for.

    I won’t even go into the extra complications of repeaters, flex and clone fields.

    Honestly, entering data directly into the db using phpMyAdmin won’t save you much, if any, time over updating each post manually.

    The best solution for doing something like this is WP All Import with the ACF add on if you’re looking to save yourself some time. Even this would be questionable unless all of the fields you’re going to add have the same value and you can do a quick copy when creating a spreadsheet to be imported.