L
L
ligisayan2020-07-09 09:57:50
MySQL
ligisayan, 2020-07-09 09:57:50

How to change acf wordpress key name?

Hello!
There is a bunch of wordpress site , acf custom fields plugin and mysql database .
I plan to replace some acf key names so as not to lose the information written in these fields.
5f06bf15a7fb0481112300.png

I do according to the instructions

UPDATE `wp_postmeta` as m JOIN `wp_posts` as p ON m.post_id = p.ID SET m.meta_key = '_new_field_name' WHERE m.meta_value = 'field_5af0d933478b4' AND p.post_type = 'post'


But, my post_type can have post, page, custom post, options page. As a result, I get such a history that the name of the key itself has changed, but the key-value binding has remained the same. How to win?
5f06bf294b947648290444.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LaraLover, 2020-07-09
@ligisayan

AND p.post_type IN ('post','page','custom post','options page')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question