This guide walks you through every step in plain English — no assumptions, no jargon. Whether you're on Windows or Mac, we've got you covered from the very beginning.
Read this first — it'll save you headaches later.
Moving a project from Lovable or Replit is a bit like moving house. It's not instant, and there's a checklist to follow — but once you're done, your project is yours, living on infrastructure you control.
A simple project (just a website, no database): about 1–2 hours. A project with a database and logins: plan for a half day. Take it at your own pace — nothing here is urgent.
Take a screenshot of your working project. Note down every feature that works today. This is your "before" picture so you can confirm everything works the same after moving.
Git is a free tool that saves every version of your code. Think of it as undo/redo on steroids.
Git is like a filing system for your code. Every change you make gets saved in history, so you can always go back. Developers worldwide use it. It's free, and you'll need it to move your project.
Go to git-scm.com/download/win — the download will start automatically.
Open the downloaded file (it looks like Git-2.x.x-64-bit.exe). Click Yes if Windows asks for permission.
Click Next through all the screens — the default options are fine. Click Install at the end, then Finish.
Check it worked: Press the Windows key, type cmd, press Enter. A black window opens. Type:
git --version
You should see something like git version 2.43.0. ✅
Open Terminal: press ⌘ Command + Space, type Terminal, press Enter.
Type this and press Enter:
xcode-select --install
A window will pop up asking to install Developer Tools. Click Install. This includes Git. Wait for it to finish (5–15 minutes).
Check it worked: In the same Terminal window, type:
git --version
You should see something like git version 2.43.0. ✅
Open your project in Lovable and click the GitHub icon or button in the top bar (it looks like a cat/octocat logo).
Click "Connect to GitHub" or "Push to GitHub". If asked, log in to GitHub and allow Lovable access.
Lovable will create a new repository on your GitHub account. Write down the URL — it will look like:https://github.com/your-name/your-project
Alternatively, if you see a Download ZIP option — use that. Save the ZIP file somewhere easy to find, like your Desktop.
Open your Replit project. In the left sidebar, look for the three dots menu (⋯) or click "Version Control" / the Git icon.
Click "Connect to GitHub" and follow the steps to push your code to a new GitHub repository. Write down the URL.
Or download directly: Click the three dots ⋯ next to your project name → "Download as ZIP". Save to your Desktop.
If you downloaded a ZIP: right-click it and choose Extract All (Windows) or double-click to unzip (Mac). You now have a folder with your code.
It's a text-based way to give your computer instructions. It sounds scary but we'll only type a few simple things. Every instruction is written out in full for you.
Open File Explorer and navigate to your project folder.
Click the address bar at the top (where it shows the folder path), type cmd and press Enter.
A black window opens already inside your project folder. ✅
Open Finder and find your project folder.
Right-click (or Control-click) on the project folder → select "New Terminal at Folder".
If you don't see this option: open System Settings → Keyboard → Keyboard Shortcuts → Services → enable "New Terminal at Folder".
Now in your command window, type these commands one at a time, pressing Enter after each:
# Tell Git who you are (use your GitHub name and email) git config --global user.name "Your Name" git config --global user.email "you@example.com" # If your code isn't from GitHub yet (downloaded ZIP), run these: git init git add . git commit -m "My project, first save"
Every app has settings and passwords stored behind the scenes. We need to copy these before moving.
Think of them as the keys to your app's locked doors — passwords for your database, secret codes for payment systems, and connection details. Without them, your moved app won't work. They're called "environment variables" because they live in your server environment, not in the code itself.
In your Lovable project, click on Settings (gear icon ⚙️) in the top right corner.
Look for a section called "Environment Variables", "Secrets", or "Configuration".
Write down every single variable — the name on the left and the value on the right. Keep this somewhere safe (a private note, password manager, or local text file never uploaded anywhere). You'll need these exact values when you set up your new home.
Also note your Supabase URL and keys — go to your Supabase project → Settings → API and copy:
• Project URL
• anon/public key
• service_role key (keep this one extra safe)
Open your Replit project. In the left sidebar, click the 🔒 Secrets padlock icon (or look for "Secrets" in the Tools menu).
You'll see a list of your secrets. Each one has a key (the name) and a value (the secret itself).
Click each secret and copy the value. Write them all down. They will not be exported with your code automatically — you must copy them manually.
Also note if you're using Replit's built-in Database — if your code mentions @replit/database, you'll need to export that data separately (see the Database section below).
Here's a plain-English guide to what you might see:
| Variable Name | What it is | You'll need it on new host? |
|---|---|---|
| VITE_SUPABASE_URL NEXT_PUBLIC_SUPABASE_URL |
The address of your database | ✅ Yes |
| SUPABASE_ANON_KEY VITE_SUPABASE_ANON_KEY |
A public key for reading your database | ✅ Yes |
| SUPABASE_SERVICE_KEY SUPABASE_SERVICE_ROLE_KEY |
A powerful private key — keep this very secret | ✅ Yes — never share publicly |
| OPENAI_API_KEY ANTHROPIC_API_KEY |
Your AI service password — costs you money if misused | ✅ Yes — rotate after migration |
| STRIPE_SECRET_KEY STRIPE_WEBHOOK_SECRET |
Payment processing keys — very sensitive | ✅ Yes — and update Stripe dashboard |
| DATABASE_URL | Full address+password of your database | ✅ Yes — will change on new host |
| NEXTAUTH_SECRET JWT_SECRET |
Secret code used for user login security | ✅ Yes |
| NEXTAUTH_URL PUBLIC_URL |
The web address of your app | ✅ Yes — will change to your new address |
You can copy your existing keys directly to your new hosting platform and everything will keep working. However, as a best practice, you should eventually rotate (regenerate) your API keys — especially for payment services and AI APIs — to ensure no one who had access to the old platform can misuse them. You don't need to do this today; just keep it on your to-do list.
In your project folder, create a file called .env and add your variables like this:
Open Notepad (search in Start menu). Type your variables like this — replace the example values with your real ones:
VITE_SUPABASE_URL=https://xxxxx.supabase.co VITE_SUPABASE_ANON_KEY=your-key-here OPENAI_API_KEY=sk-xxxxxxxxxxxx
Click File → Save As. Navigate to your project folder. In the "Save as type" dropdown, choose "All Files (*.*)". Name the file exactly: .env (with the dot at the start). Click Save.
In your Terminal (already open in your project folder), type:
nano .env
This opens a simple text editor inside Terminal.
Type your variables (replace with your real values):
VITE_SUPABASE_URL=https://xxxxx.supabase.co VITE_SUPABASE_ANON_KEY=your-key-here OPENAI_API_KEY=sk-xxxxxxxxxxxx
Press Ctrl + X to exit, then Y to save, then Enter to confirm.
Your .env file contains passwords. Make sure it's listed in your .gitignore file. In your command window, type:
echo ".env" >> .gitignore
If your project stores any information (users, posts, orders, etc.) you need to back it up before moving.
If your app lets users sign up, saves any information, or has any content that changes — you have a database. If it's a simple display-only website with no logins, you probably don't. When in doubt, follow these steps anyway.
Log in at supabase.com and open your project.
In the left menu, go to Project Settings → Database.
Scroll down to find the Backups section (available on paid plans) or use the Table Editor to export each table as a CSV file: go to a table, click Export, save the file.
Good news: Many people keep their Supabase database exactly as-is and just point their new hosting to the same Supabase project. This is the easiest option — your data never moves, only your app code does.
You don't have to move your Supabase database at all. Just deploy your code to a new host (like Vercel or Railway) and keep using the same Supabase project. Just copy your Supabase URL and keys to the new host's environment variables. Done.
Replit has a simple built-in key-value store that's unique to each project. It won't move automatically and doesn't export easily. If your app uses @replit/database, you'll need to replace it with a real database after moving. The most common choice is Turso (free, simple, very similar to use).
In your Replit project, open the Shell tab and run this to export all your data to a file:
# This prints all your stored data
node -e "const D=require('@replit/database');
const d=new D();
d.list().then(k=>Promise.all(k.map(async key=>
({key,val:await d.get(key)}))).then(r=>
console.log(JSON.stringify(r,null,2))))"
Copy the output (all the data printed) and save it in a text file called replit-data-backup.json on your computer.
We recommend Vercel for most projects — it's free, fast, and connects directly to GitHub.
For most Lovable/Replit projects: Vercel (if it's a website/app built with Next.js or React) or Railway (if it has a backend server). Both have free tiers. The steps below use Vercel.
Make sure your code is on GitHub (from Step 1). Then go to vercel.com and click Sign Up → Continue with GitHub.
Click Add New Project → Import your GitHub repository.
Before clicking Deploy, find the Environment Variables section and add all the variables you saved in Step 2. Add them one by one — Name on the left, value on the right.
Click Deploy. Vercel will build your project. After 1–3 minutes, you'll get a URL like your-project.vercel.app. Open it and test everything.
When you change where your domain points, it can take up to 48 hours to fully update worldwide. During this time, some visitors see the old site and some see the new one — this is normal. Plan to do this step on a quiet day (not before a big launch).
In Vercel: go to your project → Settings → Domains → add your custom domain.
Vercel will show you DNS records to add. Log in to wherever you bought your domain (GoDaddy, Namecheap, Cloudflare, etc.) and update those records.
Wait. After your domain is working, update the NEXTAUTH_URL or PUBLIC_URL environment variable to your real domain name.
Not sure which platform is right for you? Here's a plain-English breakdown.
Best choice for React/Next.js projects. Super easy. Connects to GitHub and deploys automatically on every save.
Very similar to Vercel. Great for any website. Easy to use, reliable, good free tier.
The closest thing to Replit but for production. Runs any type of app. Includes a database. Good for backends.
Simple, reliable, runs any kind of project. Good if you have a backend server (Express, FastAPI, etc.).
You don't have to move the database at all. Just move your app code and point it at the same Supabase project.
Another free PostgreSQL database. Very similar to Supabase's database. Easy to switch to.
Best replacement for Replit's built-in database. Free, fast, simple.
Great for larger projects. Has a git-like branching system for your data.
Tick everything off before calling it done.
Your project is now running on infrastructure you control. No more platform-specific lock-in, no more surprise pricing changes. From here, your code deploys automatically every time you push to GitHub.