Home Forums Backend Issues (wp-admin) Rename fields and move data (migrate DB)


Rename fields and move data (migrate DB)

  • When I rename a field, how can I move the data from the old field to the new field?

    I know how to run commands in PHPmyAdmin, but I am not very keen at SQL in general.

  • Hi @mrt

    I am afraid there is no other approach from the API apart from updating the postmeta records from the database.

    You would need to update the wp_postmeta table to change the keys from the old one to the new one.

    However, this will only work for simple fields such as text fields. As for repeater sub fields and flexible content sub fields, you will need to modify the specific field key modifield considering the repeater name as well.

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Rename fields and move data (migrate DB)’ is closed to new replies.