Support

Account

Home Forums General Issues Simple Fields Database to ACF Database

Unread

Simple Fields Database to ACF Database

  • I just wanted to share this query for anyone who is updating their site from SimpleFields to Advanced Custom Fields:

    SET @key_from = " _simple_fields_fieldGroupID_3_fieldID_0_numInSet_0";
    SET @key_to = "hero_title";
    
    UPDATE wp_postmeta a,
    (
       SELECT
       meta_id,post_id,meta_key,meta_value
       FROM wp_postmeta
       WHERE meta_key = @key_from
       AND meta_value <> ''
    )
    b SET a.meta_value = b.meta_value
    WHERE a.meta_key = @key_to
    and a.meta_value = ''
    and a.post_id = b.post_id

    All you need to do is find the Simple Fields key and map it to the corresponding ACF key.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.