Support

Account

Home Forums Backend Issues (wp-admin) How to move fields to another post

Solving

How to move fields to another post

  • How would I go about moving a repeater field I set up in a specific post (with all data entered already), 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 _edit_last, _edit_lock, and _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.

  • This reply has been marked as private.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.