If you are a theme developer, you can make your WordPress theme compatible with Demi WordPress Plugin by registering demo websites. This allows users to import ready-made demo content directly from the Appearance → Demi → Demo Import page.
Demi provides a WordPress filter hook called demi_import_demos which you can use to register your demo packages. Using this hook, you can define multiple demos, assign required or optional plugins, set preview images, and mark demos as premium (pro) or free.
Creating the Demo ZIP File
Before registering a demo, you need a demo ZIP file. You can create this directly from your website using Demi:
- Navigate to Appearance → Demi → Backup.
- Click the Create Content Backup button.
- After the backup is generated, click Download to save the ZIP file.

This ZIP file can now be used as the zip_source in your demo registration.
Registering Demos Using Hook
Add the following code to your theme’s functions.php file or a custom plugin:
How This Works
- Filter Hook:
demi_import_demosis used to register demo data for your theme. - Demo Array: Each demo is defined as an array with keys like:
slug– Unique ID for the demoname– Demo name displayed in Demidescription– Short description of the democategory– Category of the demozip_source– URL to the demo zip filepreview_screenshot– URL to the demo preview imagepreview_url– Live demo URLis_pro– Set totruefor premium demosplugins– Required or optional plugins for the demo
- Pro Demos: If
is_proistrue, users need a valid license or code to import the demo. - Plugins: You can define required plugins (auto-installed) and optional plugins (can be skipped by the user).

Benefits for Theme Developers
- Offer multiple demos for your theme users.
- Allow selective installation of required and optional plugins.
- Provide free and premium (pro) demos.
- Enhance the theme setup experience with one-click demo import.
