Skip to content

Export & Import Sites ​

A FilamentCraft site travels as one .zip: its pages, header and footer, theme, settings and languages, custom sections, custom fonts, redirects and every image it uses. Use it to move a site from staging to production, start a new client from a finished site, or keep a backup.

From the editor ​

Open the ⚙ settings sheet in the editor topbar:

  • Export store downloads the .zip of the site you're editing.
  • Import store… asks for a .zip, shows what's inside (name, pages, regions, images, size), then imports it as:
    • Create a new store (default): a separate draft site owned by your current team. Nothing on the current site changes.
    • Replace this store: pages with the same address, the header and footer, theme, settings, custom sections and redirects are replaced. Other pages stay. You can undo it from the Themes panel.

Photos picked from an image source such as Unsplash are hotlinked, so they travel as library entries (URL, alt text, source and credit) rather than files. The credit line survives an import, and importing the same bundle again does not duplicate them.

Editor uploads follow Livewire's temporary upload limit (12 MB by default). For larger sites, raise livewire.temporary_file_upload.rules or use the commands below.

With artisan ​

bash
php artisan filamentcraft:export cascade --path=storage/app/cascade.zip
php artisan filamentcraft:import storage/app/cascade.zip --owner="App\Models\Team:1"
php artisan filamentcraft:import storage/app/cascade.zip --replace=cascade --force
OptionCommandWhat it does
--with-historyexportInclude every saved version of each page (default: draft and published only)
--with-submissionsexportInclude form submissions (personal data, off by default)
--owner=Model:keyimportOwner of the new site (required when your app uses tenancy)
--slug=importSlug for the new site (default: the exported slug, made unique)
--replace=siteimportOverwrite this site instead of creating one
--forceimportReplace without asking (--no-interaction refuses a replace without it)
--liveimportMake the new site live right away (default: draft)
--dry-runimportValidate a JSON spec and print its errors and warnings without writing anything

Build a site from a JSON spec ​

filamentcraft:import also accepts a .json file describing a whole site: pages with their sections and blocks, header and footer, translations, SEO, redirects, theme settings and local images. It is how AI agents and scripts create sites (the site migration skill writes one), and it goes through the same importer as a bundle.

json
{
  "name": "Harbor Bakery",
  "theme": "studio",
  "media": [{ "file": "assets/hero.jpg", "alt": "Fresh loaves on the counter" }],
  "pages": [{
    "name": "Home", "slug": "home", "homepage": true,
    "seo": { "title": "Harbor Bakery", "description": "Sourdough baked daily in Portsmouth." },
    "sections": [{
      "type": "hero", "preset": "editorial",
      "settings": { "heading": "Bread worth the walk", "bg_image": "assets/hero.jpg", "cta_label": "See the menu", "cta_url": "/menu" }
    }]
  }],
  "redirects": [{ "from": "/index.html", "to": "/" }]
}
bash
php artisan filamentcraft:import site.json --dry-run
php artisan filamentcraft:import site.json --owner="App\Models\Team:1"
  • Section types, block types, presets and option values are checked against the sections your app registers (php artisan filamentcraft:sections <slug> shows a section's setting ids). Unknown types and presets are errors; unknown setting ids and invalid options are warnings.
  • Copy fields you don't set are stored empty, so no placeholder text reaches the page. Set "defaults": "all" on a section to keep its sample copy and blocks instead.
  • Image paths are relative to the JSON file and are copied into the site's media library with the alt text from media.

The full format is in the skill's site spec reference.

What happens on import ​

  • A new site starts as a draft and never copies the source's domain or subdomain, so it can't take over the original's address.
  • Images and font files are stored on your uploads disk and every reference to them is rewritten. Each file is stored once even if many sections use it.
  • Records are matched by bundle keys, not database ids, so a bundle moves between apps using integer, UUID or ULID keys.
  • A page comes in published only when the bundle carries a published version for it; the page's status field is checked but not used.
  • Shared sections come in as new rows next to the site's own; references on imported pages and regions point at the new rows, and a reference to a section the bundle doesn't carry is cleared. When you replace a site, a shared section the site already has with the same name and content is reused instead of added again.
  • Rich-text links to a page in the bundle keep following that page: the bundle stores the page's slug and the import points the link at the page on the importing site, so it follows later renames. Links to records from your own app (products, posts) and to pages the bundle doesn't carry keep their address but lose the reference, so they follow renames only after you pick the target again. Bundles exported by older versions carry no page references.
  • A variant of a dynamic page keeps its variant_of key.
  • Section types your app doesn't register are kept and listed as warnings.
  • The import runs in one transaction; a failure leaves no site rows or files behind.

Safety ​

Bundles are checked before anything is written: unsafe paths, symlinks and unexpected files are refused, every file is verified against its SHA-256 checksum, images and fonts must be types the media library accepts, and settings pass through the same cleaning as editor saves. The size cap is filamentcraft.transfer.max_mb (200 MB by default).

Shop products and orders live in your app's own tables and are not part of a bundle.