Appearance
Generating demo data
For merchants
You can generate from the Administration or the command line. Both do the same work.
From the Administration
Settings → Extensions → Demo data
- Choose which sales channels to build.
- Set products per category.
- Choose whether to download photography and whether to create customers and orders.
- Click Generate.
The run is queued, not executed in the page: the first run downloads around 400 photos and takes several minutes. The page polls for progress, survives a reload, and refuses to start a second run while one is going.
Something must process the queue
Keep an Administration tab open (Shopware's admin worker processes the job), or run a queue worker (bin/console messenger:consume async) — see Shopware: Message queue. The command line has no such requirement.
From the command line
bash
bin/console kmh:demo-data:seed # everything: 5 channels, 2,000 products
bin/console kmh:demo-data:seed -c fresh -c trade # only these storefronts
bin/console kmh:demo-data:seed -p 4 # 4 products per category — quick, e.g. for CI
bin/console kmh:demo-data:seed --skip-orders # catalogue only, no customers or orders
bin/console kmh:demo-data:seed --skip-media # no photo download (much faster)
bin/console kmh:demo-data:status # read-only: what exists already| Option | Meaning |
|---|---|
-c, --channel | Storefront key, repeatable: flagship, fresh, trade, wellness, outlet. Default: all. |
-p, --per-category | Products per leaf category. Default 50. Raising it later only adds products; nothing is renamed or renumbered. |
--skip-orders | Do not create customers or orders. |
--skip-media | Do not download or import photos. |
The command is non-interactive, so it fits in provisioning scripts. It ends with a per-entity tally of what was created, reused, adopted (an existing record matched by name) and enriched (missing fields filled in), and prints the two customer logins per storefront that have a password.
A second run against an unchanged shop reports 0 created, 0 enriched.
After the first run
Storefronts the plugin created need a theme and search indexes:
bash
bin/console theme:change --all --sync Storefront
bin/console dal:refresh:indexThe command reminds you when this is needed.
Created storefronts are given the domains http://localhost/flagship, /fresh, /trade, /wellness and /outlet. On any other host, change them under Sales Channels → (channel) → Domains to your real URLs.
The flagship storefront adopts an existing sales channel called Storefront (Shopware's default) instead of creating a new one. An adopted channel keeps its own navigation category, so your existing products stay where they are.
Running it again
Re-running is safe and cheap:
- missing records are created, existing ones reused;
- empty fields are filled in, edited fields are kept — a description you rewrote stays rewritten;
- missing links are added, nothing is unlinked;
- nothing is deleted.
Use it to top up a demo shop after adding a storefront, raising products per category, or after someone deleted data.