Use the import + export tool and a text editor to replace a few data points.
- Export your posts to xml
- Use a text editor with a search + replace tool to replace a few fields
- Import the updated xml
Format: search string -> replace string
domain="category"->domain="jetpack-portfolio-type"domain="post_tag"->domain="jetpack-portfolio-tag"<wp:post_type><![CDATA[post]]></wp:post_type>-><wp:post_type><![CDATA[jetpack-portfolio]]></wp:post_type>- the link tag needs converted from
<link>https://example.com/2005/07/project-slug/</link>to<link>https://example.com/portfolio/project-slug/</link>
- use the regular expression option for this search
<link>https://example.com/\d{4}/\d{2}/-><link>https://example.com/portfolio/
<guid isPermaLink="false">https://example.com/?p=-><guid isPermaLink="false">https://example.com/?post_type=jetpack-portfolio&p=
Once you import, WordPress does the rest. WP creates all the tags and types and updates all the ids.