Home › Forums › Backend Issues (wp-admin) › How to move fields to another post › Reply To: How to move fields to another post
`This may be a late response, but for those searching on how to move post meta (which are fields in ACF), you will need to manually edit the database table wp_postmeta. Take note that you should firstly know that you’re editing the database, and that you should probably take a backup prior to making any raw changes.
You will need to know three things prior:
• The OLD post ID
• The NEW post ID
• The fields (post meta) you want to move
In wp_postmeta, you’ll want to run an sql query to see what post meta is available for the OLD post. Simply run this query:
SELECT * FROM wp_postmeta WHERE post_id = 123
Substitute 123 for the actual OLD post id.
From there, you will see a list of post meta currently assigned to the post. Look for your fields that you want to change. To change the post ID to reflect the new post ID, you can either write a query to target certain meta_id’s or select post meta rows individually and then edit them all at once.
A query to target a range of meta id’s could be written such as:
UPDATE wp_postmeta SET post_id = 444 WHERE post_id = 123 AND meta_id > 32
444 would be your NEW post id, 123 would be your OLD post id, and 32 would be the meta_id to test and apply all changes on AFTER. You probably shouldn’t edit the
_wp_page_template rows… but the others are fair game. However, this really depends on what other plugins/post features are being used… so you’ll have to pay special attention to the meta_key values.
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’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.