Migrate cptpost with taxonomies
-
There is a way to migrate cpt with taxonomies into another cpt? Possibly massively.
Thank you
-
This plugin should be a good tool for you https://wordpress.org/plugins/post-type-switcher/
It offers bulk switching and underneath the hood there’s not much migration needing done, outside of the “post_type” column from the
wp_posts
table. So should be pretty safe overall, but as always, make sure to do a back up just in case.The taxonomies are migrated with the cpt?
Good day @rvitalia,
The taxonomies and terms from the taxonomy don’t need to actually move anywhere since they’re tied to the posts via numeral IDs and not the value of the “post type” for the post. So nothing needs to be done there, they’ll just retain their associated status.
The posts themselves don’t need to move anywhere in the database either, as we don’t do any custom storage with it all. We just provide UI to fill in values as if you were manually using
register_post_type()
orregister_taxonomy()
via code yourself, so pretty literally the only part you need to change is the value listed in thepost_type
column for the posts table for the posts in question here, and that would be covered by the plugin mentioned above. Thus the only actual migration is one column of values 🙂Ok sure, you’re right for taxonomies.
But I don’t understand how change massively the cpt because the only way is to open the cpt or via quick edit.
I’ve over 1000 cpt.
The Post Type Switcher Plugin does offer bulk editing capabilities
For example:
I selected 3 posts in a “movie” post type, clicked “edit” in the dropdown and then “apply” and it opened the bulk edit panel. The plugin adds a dropdown to choose the post type to switch them all to. Should help speed up your updating.
Lastly, just to be absolutely certain, you mean you have 1000 posts in the post type, or you have literally 1000 post types registered with CPTUI? and they all have their own posts in them?
- This reply was modified 1 year, 8 months ago by Michael Beckwith.
Yes sorry, over 1000 posts.
But I can’t find the section in the pic that you post. Where can I find it?
- This reply was modified 1 year, 8 months ago by rvitalia.
Use the standard bulk edit functionality that WordPress offers when viewing the list of available posts. The plugin adds an extra dropdown to use with that panel.
I’m so sorry but I can’t find this functionality in WordPress, where can I find it?
For example, my post type demo is “movie”. I’d go to
https://www.mydomain.com/wp-admin/edit.php?post_type=movie
There I see the list of all my movie posts. Below is hopefully a quick gif showing the steps to take to help edit some of your posts in bulk. I did end up leaving off part of the admin menu, my apologies there.
Perfect, than you so much.
Welcome.
- The topic ‘Migrate cptpost with taxonomies’ is closed to new replies.