Futurista Soft Book a call (opens in a new tab)
Founder guide

How to export your Replit code and move off Replit

Last reviewed 25 November 2026

A developer is taking over, you want your own hosting, or you just want a copy you control. Getting the code out of Replit is quick. Your secrets, database, uploaded files, sign-in and domain are what take the real work.

Short answer

Download the project as a zip from the three-dot menu above the file tree, or push it to GitHub from the Git tool. The code doesn’t bring your secrets, database, App Storage files, deployment or domain with it, and Replit’s own sign-in and connectors are tied to Replit. Export the production database separately, then set the rest up again at the new host before you move the domain.

Rather talk it through with someone? Tell us about your app →

First: protect what you have

Before you change anything, take copies you control. Even if you never leave Replit, these are worth having:

  1. A copy of the code, as a zip or on GitHub (both below).
  2. A copy of the live data. Your published app uses a separate production database, and that’s usually where the real customer data is.
  3. A list of everything the app uses on Replit: secrets, sign-in, connectors such as Stripe, App Storage files and your domain.

One security warning first. Replit keeps a hidden .cache folder in your project. Replit’s guide to copying projects says it holds internal Replit state, including cached secret values. If you ever make a zip yourself, always leave .cache out.

Step 1: get the code out

For GitHub, Replit says to use a personal access token (a password-like key you create in GitHub) instead of your password. Be careful where you keep it. Replit warns that if you store Git credentials as a secret, anyone with access to your Replit App can potentially see them. Replit’s docs don’t cover creating the GitHub repository or choosing public or private, so make it private unless you have a reason not to.

Replit’s help text mentions an auto-sync option in the Git pane, but the Git guide doesn’t document it. Don’t rely on it as your backup. Push changes yourself and check they arrived.

If your zip is over 200 MB, it still downloads. The 200 MB limit only matters if you import the zip back into Replit.

What comes with the code, and what doesn’t

Replit says that when you copy a project, you have to set up secrets, the database and deployment settings again, because they aren’t included. The same goes for moving to another host.

Part of your appIn the code?What to do
App codeYesZip or GitHub, as above
Start and build commandsYes, in .replitCopy them into the new host’s settings
Secrets and API keysNoSet them again at the new host. Check both lists: the editor’s secrets and the published app’s Production app secrets
Settings Replit fills inNoReplace values Replit sets for you, such as REPLIT_DOMAINS and DATABASE_URL
Database contentsNoExport the production database (Step 2)
App Storage filesNoDownload them and upload them to new storage
Sign-in (Replit Auth or Clerk Auth)NoPlan a new sign-in setup (see below)
Connectors such as StripeNoUse your own accounts and API keys
Live deployment and domainNoSet up hosting again, then move the domain last

Step 2: export the database

Replit gives your app two separate PostgreSQL databases. According to Replit’s production database guide, the published app uses the production database, while the editor keeps using the development one. This catches people out. Replit’s copying guide warns that its standard export command copies the development database, and your live data is usually in production.

Replit’s guide to working with your data gives three ways to export production:

Older apps may be set up differently. Until 4 December 2025, Replit hosted development databases on Neon. If an app’s DATABASE_URL contains neon.tech, it’s on the old setup. Replit’s docs don’t say where production databases run, so have a developer check which database your live app actually uses before exporting.

Sign-in, files and connectors

Step 3: move without breaking things

Replit has no guide to moving to another host, so we’ve put this order together from its docs:

  1. Keep the Replit version running until the new one is proven.
  2. Copy the start and build commands. In .replit, the deployment settings hold the run command (what starts the app) and the build command (what runs before it). replit.nix lists the system software the app needs. See Replit’s configuration guide.
  3. Create a new PostgreSQL database and restore the export into it. Use a new, empty database so nothing old gets mixed in.
  4. Set every secret again, and replace the settings Replit filled in for you, such as REPLIT_DOMAINS, REPLIT_DEPLOYMENT, REPLIT_DEV_DOMAIN, REPLIT_USER and DATABASE_URL. They’re listed in Replit’s secrets guide, and they won’t exist on the new host.
  5. Replace sign-in and connectors with your own accounts.
  6. Upload your App Storage files to the new storage.
  7. Test everything on a temporary address: sign-up, sign-in, payments, emails and file uploads.
  8. Only then move your domain. Disconnect it in Replit under Publishing → Domains, link it at the new host and update your DNS records (the settings that point your domain at a server). Replit says a new address can take a few minutes to a few hours to work for everyone.

If you bought the domain through Replit, you can move it to another registrar (domain seller) by contacting Replit Support. ICANN rules mean you have to wait 60 days after purchase first. Replit renews purchased domains automatically unless you switch off Auto renewal in the Domains tool. See Replit’s domain guide.

Can’t export? Check your workspace settings

On Enterprise accounts, an admin can turn on a setting that stops members exporting source code as a zip. See Replit’s enterprise settings. If the zip option is missing in a company workspace, ask your admin.

When to get help

Downloading the code is the easy part. Moving live customer data, sign-in, payments and the domain without anyone noticing is where moves go wrong. Replit sign-in adds an extra step, because your users are Replit accounts. If real customers depend on the app, have a developer plan the move and check it first. If it’s already misbehaving on Replit, start with fixing Replit preview and publishing problems, or see how we fix AI-built apps. If you want someone to take the app over completely, see app rescue.

Questions founders ask

Can I download my Replit project as a zip?

Yes. Open the three-dot menu at the top of the file tree and choose Download as zip. If that fails, Replit suggests making the zip from the Shell and downloading it from the file tree. Leave the .cache folder out of any zip you make yourself. On Enterprise accounts, an admin can block zip exports.

Does the export include my secrets and data?

No. Secret values stay in the old project. The database, App Storage files and deployment settings have to be set up again. Export the production database separately, because that’s usually where your live data is.

Will my users’ logins move with the app?

Not automatically. With Replit Auth, your users sign in with Replit accounts, and Replit’s docs don’t describe exporting them. With Clerk Auth on Replit, the users sit in a Clerk tenant that Replit manages, and the docs don’t say whether they can be moved. Plan the sign-in move with a developer before you switch.

Should I use a zip or GitHub?

Use both if you can. A zip is a one-time snapshot of everything on disk. GitHub holds only what you commit and push, but gives you an ongoing copy a developer can work from. Whichever you use, never include the .cache folder or a database export.

Read next