Home / Errors / Replit / data-disappeared-after-publishing

Replit database empty after deploy: where did my data go?

Replit Easy 10-20 minutes Last verified Jul 17, 2026
The fix  Your data is not gone. Since July 2025, Replit provisions a separate production database at first deployment: it gets your schema but none of your development rows. Open the workspace Database pane to confirm your dev data is intact, then export from dev and import into production any seed data you genuinely need there. Replit never copies rows automatically.

Symptoms

  • The app works fine in the Replit workspace with all your test data, but the live app's database is empty after you publish
  • Data you add while continuing to build never shows up on the live site
  • It looks like Replit wiped your database at deployment
  • The workspace Database pane still shows every row you thought you lost

Why it happens

Replit creates a separate production database at first deployment

Since the post-SaaStr safety changes in July 2025, Replit provisions a production database (hosted on Neon) the first time you deploy. It receives a fresh copy of your schema but none of your development data, so the live app starts with empty tables.

Development data stays in the development database by design

Your dev data lives in the dev database on Replit's infrastructure, and the Agent is deliberately blocked from touching the production database. That block is the guardrail that prevents another SaaStr-style incident, and an empty prod database is its visible side effect.

Migrations carry schema, not rows

At redeploy time, Replit's migration step diffs the dev and prod schemas and applies migration statements to production. Row data is never copied, so anyone who does not know about the split reads the empty production database as data loss.

How to fix it

  1. Check which database you are actually looking atThe Database pane in the workspace shows the development database. The deployed app reads the production database. They are different databases with different contents, so identify which one is in front of you before concluding anything is missing.
  2. Confirm your dev data is still thereOpen the development database from the workspace. Your rows are still in it; nothing was deleted at publish time. What you saw on the live site was a brand-new production database that started empty.
  3. Move seed data to production deliberatelyIf production genuinely needs seed or reference data, export it from the development database and import it into the production database yourself, or build an admin/seed flow in the app. Replit does not copy rows automatically, ever, so this is a manual, intentional step.
  4. Redeploy after schema changesWhen you change the schema during development, redeploy so Replit's migration step diffs the dev and prod schemas and applies the migration statements to production. Until you redeploy, the production schema stays where it was.
  5. Do not load production data back into devResist the shortcut of copying real production data into the development database the Agent can write to. That recreates exactly the pre-incident risk the separation was built to eliminate.

How to prevent it

  • Learn the split once: workspace Database pane is dev, deployed app reads prod, and rows never cross automatically
  • Build a repeatable seed script or admin import flow instead of hand-copying data at each deploy
  • Redeploy after every schema change so migrations reach production
  • Keep real user data only in production, where the Agent cannot touch it

Tools that actually fix this

Recommended because they address the failure mode above, not because of the payout. Some are affiliate links; see how we choose.

Frequently asked questions

Did Replit delete my data when I published my app?

No. Replit provisions a separate production database at first deployment, and it starts with your schema but zero rows. Your development data is still in the development database, visible in the workspace Database pane; the live app is simply reading a different, newer database.

How do I get my development data into the Replit production database?

Export the data from the development database and import it into the production database deliberately, or build an admin/seed flow into your app. Replit does not copy rows from dev to prod automatically at deploy time; only the schema carries over.

Why doesn't Replit copy data to production automatically?

The dev/prod database separation is a safety measure Replit shipped in July 2025 after the SaaStr incident, in which its Agent wiped a live production database. The Agent is deliberately blocked from the production database, and keeping dev data out of prod by default is part of that same protection.

Do schema changes carry over to the Replit production database?

Yes, at redeploy time. Replit's migration step diffs your development schema against the production schema and applies generated migration statements to production. Row data is not part of that process; only the structure moves.

Sources

Related errors

The Vibe Oops briefing

One email when something ships to production that should not have. New incidents, new error guides, no filler.