I have a custom post type with over 100 posts. I want to create another custom post type and have the same posts with the same post titles. Is there a simple DB query that will allow me to do this, or am i stuck with having to re-create each post?
Leave a Reply
You must be logged in to post a comment.
Backup your database
You can do this pretty easily. I created a proof-of-concept for you to try out. I would backup the database before running this.
Run the plugin
Configure the plugin by setting
$post_type_1
and$post_type_2
variables to your source and destination post types.To run this plugin, you need to be logged in as an administrator. Then, visit:
http://yourdomain.com/wp-admin/?duplicate-posts=magic-password
This plugin accounts for the basic post information and its postmeta. It does not account for revisions, auto-drafts, or attachments. You can run similar loops within the foreach loop to duplicate those sub post types.