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
- S:
search string - R:
replace string
- S:
- convert categories to portfolio types
- S:
domain="category" - R:
domain="jetpack-portfolio-type"
- convert tags to portfolio tags
- S:
domain="post_tag" - R:
domain="jetpack-portfolio-tag"
- convert post type to jetpack portfolio type
- S:
<wp:post_type><![CDATA[post]]></wp:post_type> - R:
<wp:post_type><![CDATA[jetpack-portfolio]]></wp:post_type>
- update url link
- use the regular expression option for this search
- S:
<link>https://example.com/\d{4}/\d{2}/ - R:
<link>https://example.com/portfolio/ - summary: converts
<link>https://example.com/2005/07/project-slug/</link>becomes<link>https://example.com/portfolio/project-slug/</link>
- update guid field
- S:
<guid isPermaLink="false">https://example.com/?p= - R:
<guid isPermaLink="false">https://example.com/?post_type=jetpack-portfolio&p= - summary:
<guid isPermaLink="false">https://example.com/?p=158</guid>becomes<guid isPermaLink="false">https://example.com/?post_type=jetpack-portfolio&p=158</guid>
Once you import, WordPress does the rest. WP creates all the tags and types and updates all the ids.