Export and import
Copy a space's content into a folder, and from the folder into a new space: every page, entry, version and media file. It is how you move a site or keep a copy.
What travels
npx smoodly export writes your site's content into a folder: every page and entry with its whole history, the redirects, and the media library with its files. npx smoodly import writes that folder into another space. Every id stays the same, so the site renders exactly as before.
To copy production into a project's preview space, use Add a preview space or Refresh from production at smoodly.io (Deploying): the service copies it for you. These two commands are for moving a site to another project and for keeping a copy.
Members do not travel: a space's members are set in the project at smoodly.io. The import lists the source's members, so you can add them to the new space there.
Both commands run in your app's folder and read SMOODLY_SPACE_ID and SMOODLY_SECRET_KEY from .env.local (Astro: .env). The secret key decides whose content they reach, so there is nothing else to pass. The publishable key is refused, because it reads no drafts and writes nothing:
smoodly: SMOODLY_SECRET_KEY holds the publishable key (pk_…) — copy the secret key (sk_…) from the space page.
Export
npx smoodly exportExported space sp_…: 14 pages (41 versions), 32 entries (118 versions), 51 assets (38.2 MB), 9 redirects
→ smoodly-export-2026-10-16/
The folder lands in the folder the command runs in. It holds manifest.json, one JSON file per table under rows/ and the media files under media/. Zip it to hand it over. --out <dir> names another folder. An existing folder is never overwritten. The starters' .gitignore lists smoodly-export-*, so the folder stays out of your repository.
An editor who saves while the export runs can stop it with Content changed during export — run it again. Run it again.
Import into a new space
A space that already has content refuses an import, so import into a new one:
- Export, with the env file still naming the space you are leaving.
- Create a new project at smoodly.io and copy its production space's three values.
- Point the env file at the new space: its
SMOODLY_SPACE_ID,SMOODLY_SECRET_KEYandSMOODLY_PUBLISHABLE_KEY. - Push the schema, so the space can serve the site (a build or the dev server would push it too):
npx smoodly push- Import:
npx smoodly import smoodly-export-2026-10-16The path is the export folder's, relative or absolute, so it can stay in the old site's folder. A live page reads what landed straight away: there is nothing to rebuild.
Imported 14 pages, 32 entries, 51 assets and 9 redirects into space sp_….
Members in the source — add them to the space's members in the project at smoodly.io:
anna@example.com (admin), mikko@example.com (editor)
Restart or redeploy the app: it may have cached pages from while the space was empty.
- Add the members to the new space at smoodly.io: nobody can sign in to its admin until its member list names them. Then restart or redeploy the app.
When import refuses
Import checks everything before it writes anything.
- The space already has content. Import writes only into an empty space, and it never deletes. Use a new project's space.
- The space is being copied into. A preview space refuses an import while a copy from production runs, and after one failed. Wait for the copy, or retry it at smoodly.io.
- The service versions differ. The export and the target space must come from the same version of Smoodly's service. The message says which side is newer.
- It stopped midway, on a dropped connection for example. Run the same command again: rows and files that already landed are skipped. A run that finds everything already there says
Nothing newand writes no content.
Next, Upgrading.