Pages

  • Beranda

Muslim Online

  • Home
  • Menu1
    • Submenu1
    • Submenu2
    • Submenu3
  • Menu2
    • Submenu1
    • Submenu2
    • Submenu3
  • Menu3
  • Menu4
Home » Uncategories » How to Build an Interactive WordPress Theme Demo with Playground Blueprints

How to Build an Interactive WordPress Theme Demo with Playground Blueprints

— Senin, 05 Januari 2026 — Add Comment

WordPress Playground lets anyone launch a live WordPress site instantly — no hosting or installation required. It's a quick, hands-on way to explore how a theme looks and behaves. You can open a fresh WordPress instance with a single link and sta…
Read on blog or Reader
Site logo image WordPress.com News Read on blog or Reader

How to Build an Interactive WordPress Theme Demo with Playground Blueprints

By Birgit Pauli-Haack on January 5, 2026

WordPress Playground lets anyone launch a live WordPress site instantly — no hosting or installation required. It's a quick, hands-on way to explore how a theme looks and behaves.

You can open a fresh WordPress instance with a single link and start experimenting right away.

If a theme is available in the WordPress repository, you can preview it in Playground by adding the theme's slug to the URL, for example:
?theme=kiosko.

Example of a WordPress theme demo.

That said, each Playground site starts with a clean WordPress install, so themes load with no existing pages or demo content.

A clean WordPress installation.

If you want your theme to appear exactly as you've designed it — with sample content, navigation, and settings — you can use Playground Blueprints.

In this guide, I'll show you how to get started with Playground Blueprints and create a complete, interactive demo site for your theme.

For this exercise, you'll use a GitHub repository to store assets, such as .xml and blueprint.json files, to build your demo. For Playground to have access, it needs to be a public repository.

What are Playground Blueprints?

WordPress Playground Blueprints let you create preconfigured demo sites in JSON format.

Each Blueprint describes how the Playground instance should be built — what theme to install, what content to import, which settings to enable, and more.

You can browse the full documentation here: WordPress Playground → Blueprints

With Blueprints, you can share a single link that launches a fully configured demo of your theme — complete with pages, patterns, and media — so visitors can explore it directly in their browser.

Let's explore the process step by step.

1. Create your demo website content

First, build a demo version of your theme locally — complete with pages, posts, navigation, and settings — to show how it looks in a real site. 

You'll later export this content and use it inside Playground.

If you've worked with the Site Editor before, this part will feel familiar. You already know what combination of pages, posts, navigation, images, and WordPress settings makes your theme shine.

For this post, I prepared a demo site using the Twenty Twenty-Five default theme, applying one of its style variations and modifying some templates.

The example mimics a travel blog demo with a homepage, blog page, about page, and example templates and patterns:

A travel blog demo homepage.

I've also included a 404 page template:

Example theme demo 404 error page.

As well as an 'About Us' page:

Example About Us page.

And more.

2. Handle images and patterns

While you create your content, you might use Patterns that come with your theme. 

Often, images used are part of the theme and stored in the theme's assets folder.

You would need to upload those to the Media Library and pull them from there into your pages or posts — or replace their URL references in the content with relative links pointing to:

 /wp-content/themes/{yourtheme}/assets/{filename} 

…and remove the https://{domain.ext} part of the URL.

It's best to use WordPress tools to automatically add them to the Media Library to save or from the image block toolbar.

Uploading a file to the WordPress Media Library.

This gives you a self-contained content file you can reuse with other themes or Playground instances.

3. Export your content

Once you've built the demo content on your local site, export it using the WordPress Export feature:

Go to Tools → Export, and select All Content (or make specific choices).

WordPress Export screen.

You can learn more about the Export feature in the documentation.

Before importing the .xml file into Playground, make sure your images and other assets are ready. 

You'll also need to update the image references in your content file.

4. Prepare your export for Playground

Before importing your exported .xml file, make sure Playground can access your media files and that all image links point to the correct locations.

To do this:

  • Upload your demo images and assets to a public GitHub repository (for example, to a /media folder).
  • Update the image references in your .xml file so they point to those GitHub URLs.

Upload your demo images and assets

Playground uses the WordPress Importer plugin, which automatically resizes images and updates URLs for the new site. 

However, the importer tries to fetch images from their original URLs — and most web servers block these requests because of Cross-Origin Resource Sharing (CORS) policies.

To fix that, host your demo assets on GitHub.

GitHub's raw.githubusercontent.com domain bypasses these restrictions, making it ideal for serving demo media.

Upload all your images to a /media folder in your GitHub repository and keep their original filenames to speed up the import process.

Update the image references in your .xml file

Next, replace the image references in your .xml file with the new GitHub URLs, under the <wp:attachment_url> tag.

Use this pattern:

 https://raw.githubusercontent.com/{organization}/{reponame}/{branch}/media/{filename} 

For example:

 <wp:attachment_url><![CDATA[https://raw.githubusercontent.com/wptrainingteam/tt5-demo-blueprint/main/media/random-headshot-1.jpg]]></wp:attachment_url> 

And here's what each part means:

  • Organization: your GitHub organization (for example, wptrainingteam)
  • Repository: your repo name (for example, tt5-demo-blueprint)
  • Branch: main
  • Folder: media
  • Filename: the original file name

Search your .xml file for <wp:attachment_url> (keeping the <![CDATA[...]]> tags intact) and replace each reference with the correct GitHub URL.

Tip: In the Twenty Twenty-Five demo site example, there were 17 replacements in total.

Your integrated development environment (IDE) probably allows you to find the particular string in your .xml file, no matter how big it is. You might see other image references in the file when you use the same image in different sizes.

I added a small Bash script to the repo; you could modify and use it at your own risk.

The WordPress Importer will resize the new images from the attachment URLs and replace the references in other places. You only need to change each image reference once.

5. Create your Blueprint

Now that your demo content is ready, it's time to configure your Playground site using a Blueprint.

A Blueprint defines how Playground sets up your demo — which theme to install, which content to import, and which options to apply.

Understand the Blueprint structure

The Blueprint file has two main parts:

  • Settings – placed in the root of the document.
  • Steps – actions listed in an array that Playground runs in order.

You can learn more in the Blueprint documentation.

Here's an outline of a starter JSON file:

 { "$schema": "https://playground.wordpress.net/blueprint-schema.json", "login": true, ... more settings,  "steps": [ 	{         	"step":"installTheme" {             }     }, 	{             "step":"importWXR" {             }     } 	more steps...  	] }   

The first line ($schema) is optional.

Adding it helps your IDE validate syntax, suggest properties, and catch possible errors.

Add basic settings

The first setting is "login": true.

If you don't need specific credentials, this shorthand automatically gives visitors admin access on the demo site.

If you prefer more control, review the Blueprint step documentation and the Blueprint Gallery for different scenarios.

Clean the default WordPress content

Each new WordPress install includes sample content — a post, a comment, and a page — which can interfere with your demo.

You can add a step to the Blueprint to remove the content by executing a WP-CLI command:

       {         "step": "wp-cli",         "command": "wp site empty --yes"       }, 

Import your demo content

To import the content specifically, leverage the importWxr step — using the raw.githubusercontent.com domain to point to your *.xml file.

   {      "step": "importWxr",      "file": {        "resource": "url",        "url": "https://raw.githubusercontent.com/wptrainingteam/tt5-demo-blueprint/main/playgroundcontent.xml"          }   } 

Install and activate the theme

Next, install and activate the theme you want to demo.

It can come from the WordPress repository, a ZIP file, or a directory of theme files.

This example uses the default Twenty Twenty-Five theme:

     {         "step": "installTheme",         "themeData": {             "resource": "wordpress.org/themes",             "slug": "twentytwentyfive"     },     "options": {         "activate": true     }     }, 

Set Site options

You might also want to set a few Site options. You can use a step or the shorthand to setSiteOptions:

  • For the links to category pages and navigation menus to work, you'll need to enable pretty permalinks.
  • You can also set values for the blog name and description to make it more enticing.
  • To fully set up your demo, you'll probably also want to configure your front page and blog page.

The snippet below shows how to implement these settings:

 "setSiteOptions": {        "blogname": "Twenty-Twenty-Five",        "blogdescription": "The WordPress default theme",        "show_on_front": "page",        "page_on_front": 80,        "page_for_posts": 26,        "permalink_structure": "/%postname%/"     } 

The numbers for page_on_front and page_for_posts match the post IDs in your imported content.

This works because the site was emptied before import.

Optional: Add plugins

You can also include plugins — for example, block collections or WooCommerce.

Here's the shorthand for installing the "Block Visibility," "Public Post Preview," and "Gutenberg" plugins and activating them. 

To add more plugins, just add them to the array:

 { "plugins": [ "block-visibility","public-post-preview", "gutenberg" ] } 

Combine everything

Now that you've added each step, it's time to combine them into one complete Blueprint file.

This final JSON defines your entire demo site setup — from cleaning the default content to installing your theme, importing posts, and setting site options:

 {   "$schema": "https://playground.wordpress.net/blueprint-schema.json",   "login": true,   "steps": [     {         "step": "wp-cli",         "command": "wp site empty --yes"     },     {       "step": "updateUserMeta",       "meta": {           "admin_color": "modern"       },       "userId": 1     },     {         "step": "installTheme",         "themeData": {             "resource": "wordpress.org/themes",             "slug": "twentytwentyfive"         },         "options": {             "activate": true         }     },      {       "step": "importWxr",                     "file": {                             "resource": "url",                             "url": "https://raw.githubusercontent.com/wptrainingteam/tt5-demo-blueprint/main/playground-content.xml" }     },     {       "step": "setSiteOptions",       "options": {         "blogname": "Theme Demo ",         "blogdescription": "A preview of a theme",         "show_on_front": "page",                 "page_on_front": 80,                 "page_for_posts": 26,         "permalink_structure": "/%postname%/"       }     }   ],    "plugins": [ "block-visibility","public-post-preview", "gutenberg" ], } 

6. Test your Blueprint

Before sharing your demo, test the Blueprint in Playground to confirm that every step runs correctly and your theme appears as intended.

Open your Playground URL to launch the demo site and check that:

  • The theme installs and activates properly.
  • All pages, posts, and menus from the .xml import display.
  • Images load from the GitHub /media folder.
  • Permalinks and front-page settings work as expected.

If something looks off, review your blueprint.json for typos or missing commas.

Blueprints are declarative, so even a small syntax issue can interrupt setup. Fix any issues locally, upload the corrected file to GitHub, and refresh the Playground link to test again.

7. Share your Blueprint

Finally, upload your blueprint.json file to GitHub and share the Playground URL with the Blueprint query parameter.

You can use a URL shortener such as Bitly to track usage.

For example:

https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wptrainingteam/tt5-demo-blueprint/main/blueprint.json

The complete theme demo is available on GitHub and includes:

  • The content to import
  • Images and assets in the /media folder
  • The blueprint.json file
  • The Bash script to help with the attachment URL replacements

Tip: The Blueprints documentation offers many ways to configure your Playground instance for your or your clients' needs.

Learn more about Blueprints and Playground

Now that you've learned how to use Playground to showcase your products, explore these guides on the WordPress Developer Blog:

  • Introduction to Playground: running WordPress in the browser
  • Exploring the future of web development with WebAssembly and PHP
  • How to use WordPress Playground for interactive demos

You can also apply this knowledge in WordPress Studio, which now supports Blueprints.

Learn more here.
Comment
Like
You can also reply to this email to leave a comment.

WordPress.com News © 2026.
Unsubscribe or manage your email subscriptions.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real‑time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc.
60 29th St. #343, San Francisco, CA 94110

Tweet

0 Response to "How to Build an Interactive WordPress Theme Demo with Playground Blueprints"

← Posting Lebih Baru Posting Lama → Beranda
Langganan: Posting Komentar (Atom)

Arsip Blog

  • April 2026 (224)
  • Maret 2026 (462)
  • Februari 2026 (432)
  • Januari 2026 (460)
  • Desember 2025 (297)
  • November 2025 (170)
  • Oktober 2025 (65)
  • September 2025 (69)
  • Agustus 2025 (69)
  • Juli 2025 (61)
  • Juni 2025 (74)
  • Mei 2025 (63)
  • April 2025 (77)
  • Maret 2025 (146)
  • Februari 2025 (132)
  • Januari 2025 (134)
  • Desember 2024 (177)
  • November 2024 (166)
  • Oktober 2024 (127)
  • September 2024 (141)
  • Agustus 2024 (127)
  • Juli 2024 (167)
  • Juni 2024 (132)
  • Mei 2024 (108)
  • April 2024 (102)
  • Maret 2024 (105)
  • Februari 2024 (85)
  • Januari 2024 (64)
  • Desember 2023 (74)
  • November 2023 (91)
  • Oktober 2023 (49)
  • September 2023 (47)
  • Agustus 2023 (63)
  • Juli 2023 (45)
  • Juni 2023 (47)
  • Mei 2023 (49)
  • April 2023 (42)
  • Maret 2023 (53)
  • Februari 2023 (38)
  • Januari 2023 (39)
  • Desember 2022 (47)
  • November 2022 (15)
  • Oktober 2022 (9)
  • September 2022 (10)
  • Agustus 2022 (9)
  • Juli 2022 (9)
  • Juni 2022 (8)
  • Mei 2022 (10)
  • April 2022 (13)
  • Maret 2022 (13)
  • Februari 2022 (16)
  • Januari 2022 (15)
  • Desember 2021 (18)
  • November 2021 (16)
  • Oktober 2021 (12)
  • September 2021 (10)
  • Agustus 2021 (12)
  • Juli 2021 (18)
  • Juni 2021 (11)
  • Mei 2021 (11)
  • April 2021 (13)
  • Maret 2021 (12)
  • Februari 2021 (12)
  • Januari 2021 (13)
  • Desember 2020 (10)
  • November 2020 (14)
  • Oktober 2020 (17)
  • September 2020 (10)
  • Agustus 2020 (14)
  • Juli 2020 (17)
  • Juni 2020 (21)
  • Mei 2020 (18)
  • April 2020 (11)
  • Maret 2020 (16)
  • Februari 2020 (8)
  • Januari 2020 (9)
  • Desember 2019 (13)
  • November 2019 (12)
  • Oktober 2019 (9)
  • September 2019 (11)
  • Agustus 2019 (26)
  • Juli 2019 (32)
  • Juni 2019 (32)
  • Mei 2019 (30)
  • April 2019 (33)
  • Maret 2019 (20)
  • Februari 2019 (12)
  • Januari 2019 (16)
  • Desember 2018 (14)
  • November 2018 (25)
  • Oktober 2018 (12)
  • September 2018 (14)
  • Agustus 2018 (14)
  • Juli 2018 (12)
  • Juni 2018 (27)
  • Mei 2018 (48)
  • April 2018 (33)
  • Maret 2018 (45)
  • Februari 2018 (73)
  • Januari 2018 (337)
  • Desember 2017 (338)
  • November 2017 (251)
  • Oktober 2017 (381)
  • September 2017 (31)

Label

  • Berita
  • Kajian Islam
  • Politik
Diberdayakan oleh Blogger.
  • When Typepad Shut Down, We Helped 3,684 Blogs Find a New Home
    30 days' notice. Years of memories at stake. Here's how WordPress.com st...
  • [New post] What’s New in the Block Editor: Edit Your Images, Drag and Drop Blocks and Patterns, and More
    Caroline Moore posted: " From time-saving features to enhancements in your favorite blocks, these block editor improvements...
  • MusliModerat: Peringati Hari Santri, Ansor dan Banser Tulungagung Bedah Rumah Anak Yatim
    MusliModerat ...
↑
Copyright © 2017 - Muslim Online - All rights reserved Powered by Blogger