Skip to content

Instantly share code, notes, and snippets.

@mattyza
Last active May 19, 2024 08:20
Show Gist options
  • Save mattyza/47b23aca53a7de81743d3dd9f01464c7 to your computer and use it in GitHub Desktop.
Save mattyza/47b23aca53a7de81743d3dd9f01464c7 to your computer and use it in GitHub Desktop.
A blueprint for importing a set of content in WXR format from another gist into WordPress Playground
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/kb/",
"steps": [
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://gist.githubusercontent.com/mattyza/47b23aca53a7de81743d3dd9f01464c7/raw/2442ca3400b8cf2666f6015c48744d3397f04b08/kb-pages-to-import.xml"
}
},
{
"step": "setSiteOptions",
"options": {
"blogname": "Demoing WordPress for MVPs",
"permalink_structure": "/%postname%/"
}
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!-- on the site. For each author, you may choose to map to an -->
<!-- existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!-- contained in this file into your site. -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>
<channel>
<title>Test KB</title>
<link>https://example.com</link>
<description></description>
<pubDate>Sun, 19 May 2024 08:11:53 +0000</pubDate>
<language>en-US</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>https://example.com</wp:base_site_url>
<wp:base_blog_url>https://example.com</wp:base_blog_url>
<wp:author><wp:author_id>1</wp:author_id><wp:author_login><![CDATA[demo]]></wp:author_login><wp:author_email><![CDATA[matt.cohen@automattic.com]]></wp:author_email><wp:author_display_name><![CDATA[demo]]></wp:author_display_name><wp:author_first_name><![CDATA[]]></wp:author_first_name><wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>
<item>
<title><![CDATA[Knowledge base]]></title>
<link>https://example.com/kb/</link>
<pubDate>Sun, 19 May 2024 08:03:29 +0000</pubDate>
<dc:creator><![CDATA[demo]]></dc:creator>
<guid isPermaLink="false">https://example.com/?page_id=7</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Welcome to our knowledge base. Use the sections below to learn how to use our product, and create something extraordinary.</p>
<!-- /wp:paragraph -->
<!-- wp:page-list {"parentPageID":7} /-->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>7</wp:post_id>
<wp:post_date><![CDATA[2024-05-19 08:03:29]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2024-05-19 08:03:29]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2024-05-19 08:04:43]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2024-05-19 08:04:43]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[kb]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[page]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
</item>
<item>
<title><![CDATA[Tutorials]]></title>
<link>https://example.com/kb/tutorials/</link>
<pubDate>Sun, 19 May 2024 08:04:28 +0000</pubDate>
<dc:creator><![CDATA[demo]]></dc:creator>
<guid isPermaLink="false">https://example.com/?page_id=10</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Below are tutorials to help you on you way.</p>
<!-- /wp:paragraph -->
<!-- wp:page-list {"parentPageID":10} /-->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://example.com/kb/">&lt;- Back to knowledge base</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>10</wp:post_id>
<wp:post_date><![CDATA[2024-05-19 08:04:28]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2024-05-19 08:04:28]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2024-05-19 08:05:05]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2024-05-19 08:05:05]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[tutorials]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>7</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[page]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<wp:postmeta>
<wp:meta_key><![CDATA[_edit_last]]></wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_wp_page_template]]></wp:meta_key>
<wp:meta_value><![CDATA[default]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title><![CDATA[Courses]]></title>
<link>https://example.com/kb/courses/</link>
<pubDate>Sun, 19 May 2024 08:05:58 +0000</pubDate>
<dc:creator><![CDATA[demo]]></dc:creator>
<guid isPermaLink="false">https://example.com/?page_id=14</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Below are courses you can take to help you on you way.</p>
<!-- /wp:paragraph -->
<!-- wp:page-list {"parentPageID":14} /-->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://example.com/kb/">&lt;- Back to knowledge base</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>14</wp:post_id>
<wp:post_date><![CDATA[2024-05-19 08:05:58]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2024-05-19 08:05:58]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2024-05-19 08:06:08]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2024-05-19 08:06:08]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[courses]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>7</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[page]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
</item>
<item>
<title><![CDATA[Videos]]></title>
<link>https://example.com/kb/videos/</link>
<pubDate>Sun, 19 May 2024 08:06:34 +0000</pubDate>
<dc:creator><![CDATA[demo]]></dc:creator>
<guid isPermaLink="false">https://example.com/?page_id=17</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Below are videos to help you on you way.</p>
<!-- /wp:paragraph -->
<!-- wp:page-list {"parentPageID":17} /-->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://example.com/kb/">&lt;- Back to knowledge base</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>17</wp:post_id>
<wp:post_date><![CDATA[2024-05-19 08:06:34]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2024-05-19 08:06:34]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2024-05-19 08:06:45]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2024-05-19 08:06:45]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[videos]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>7</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[page]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
</item>
<item>
<title><![CDATA[Getting Started]]></title>
<link>https://example.com/kb/courses/getting-started/</link>
<pubDate>Sun, 19 May 2024 08:09:31 +0000</pubDate>
<dc:creator><![CDATA[demo]]></dc:creator>
<guid isPermaLink="false">https://example.com/?page_id=20</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Lets get started with how to use this product.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>This is the first page. We'll put some introductory information here.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Nam ut orci dui. In varius dignissim dui, et facilisis nulla placerat sit amet. Sed cursus neque nec lacus ultrices quis commodo libero sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce gravida, erat eu rutrum feugiat, nibh lectus sagittis tortor, id molestie nulla dui sit amet sem. Nullam tincidunt quam quis velit porta semper. Quisque posuere, tortor vel rhoncus tincidunt, lectus risus lacinia quam, non eleifend lacus ligula quis orci. Maecenas et mi erat, vel fermentum lorem. Morbi scelerisque porttitor enim, at porttitor velit ultricies ut. Donec mauris quam, euismod ac porta a, ullamcorper quis augue. Vivamus odio sem, luctus sit amet faucibus ut, dapibus eget ligula. Phasellus nibh dolor, dapibus ac laoreet sed, mollis a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi ornare, ante sed posuere vehicula, nisl nunc fermentum dolor, interdum malesuada nunc metus a massa.</p>
<!-- /wp:paragraph -->
<!-- wp:nextpage -->
<!--nextpage-->
<!-- /wp:nextpage -->
<!-- wp:paragraph -->
<p>Page 2 now shows some more detail.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed convallis sem. Curabitur in commodo eros. Mauris pretium condimentum mi, quis viverra leo volutpat et. Nam turpis enim, cursus a volutpat vel, dapibus sed metus. Donec sollicitudin elementum lacus, vitae pulvinar tortor imperdiet et. Proin pellentesque nibh nec tellus commodo tincidunt. Maecenas ornare leo ut mi suscipit sit amet vulputate eros fermentum. Nulla ultrices iaculis feugiat. Sed vel ligula turpis. Vestibulum sit amet tincidunt elit. Donec non nunc vel sapien pulvinar volutpat. Proin vel arcu ut nunc feugiat molestie sed eget eros. Suspendisse mollis turpis a risus euismod luctus.</p>
<!-- /wp:paragraph -->
<!-- wp:nextpage -->
<!--nextpage-->
<!-- /wp:nextpage -->
<!-- wp:paragraph -->
<p>Page 3 shows the final details of this course.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Nulla facilisi. Donec risus lectus, convallis ut commodo at, ornare nec risus. Nullam mi enim, iaculis nec pharetra a, commodo lobortis dui. Sed sapien felis, interdum in sagittis vulputate, imperdiet at ligula. Nunc sit amet leo sed magna hendrerit adipiscing. Morbi eget erat eros, ac imperdiet arcu. Nullam et mauris adipiscing augue sollicitudin luctus vitae id sapien. Praesent massa justo, consequat id sodales suscipit, elementum eu dui. Quisque orci tellus, tristique eget posuere quis, ultricies id ligula. Mauris dui sapien, viverra tempor scelerisque at, vulputate non turpis. In nunc dolor, laoreet eget pharetra quis, aliquet sed orci. Curabitur nibh metus, lobortis a gravida sit amet, facilisis malesuada tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://example.com/kb/">&lt;- Back to knowledge base</a></div>
<!-- /wp:button -->
<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://example.com/kb/courses/">↑ Back to courses</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>20</wp:post_id>
<wp:post_date><![CDATA[2024-05-19 08:09:31]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2024-05-19 08:09:31]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2024-05-19 08:11:09]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2024-05-19 08:11:09]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[getting-started]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>14</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[page]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
</item>
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment