Deploy Statamic without losing your content.

Statamic keeps content on disk, which makes the deploy model matter more than usual. Depfloy shares the content and uploads directories across releases, so what editors write in the control panel survives the next deploy.

What runs on the server
Runtime
PHP 8.4
Releases
Zero-downtime symlink flip
Rollback
One click; rebuild depends on runtime and retained releases
The deploy script Depfloy runs
composer install --no-dev --optimize-autoloader
php please cache:clear
npm ci && npm run build
Flat-file content is treated as state

content/ and public/assets are shared directories linked into each release, not copies inside it — an entry published from the control panel is still there after the next deploy.

Static caching survives the flip

Cache directories that should outlive a release are shared, so the first request after a deploy is not a cold one for every page.

Here the file backup is the one that matters

Because the content is files, the project-files backup is the one that matters. It runs on a schedule to S3, R2, SFTP or local disk, with restore.

Statamic is the framework where a careless deploy model does the most damage, because the content is files rather than rows. Shared directories are what keep a deploy from overwriting the work published since the last one.

FAQ

Statamic questions

Does this work with the flat-file setup or do I need a database? +
Both work. Flat-file content is handled through shared directories; if you use a database driver, provision one on the same or a separate server.
What happens to entries created between deploys? +
Nothing — they live in a shared directory outside the release, so a new release links to the same content rather than replacing it.
Can editors keep working during a deploy? +
Yes. The old release serves every request until the symlink flips.

9 other frameworks deploy the same way.

The release model is identical; only the build steps differ.

Deploy Statamic to your own server.

7 days free, no credit card. Your servers keep running exactly as Depfloy configured them.