You can use the wp_insert_post() function to duplicate a post. You just need to remove the post ID from the data you pass to it, and Wordpress will create a new post instead of updating an existing one. E.g. $post_id = 1234; $post = (array) get_post( $post_id ); // Post to duplicate.