Guide
How to Back Up a Lovable Site (and Restore It)
A Lovable site backup has two halves: the code and everything that lives outside the code. For the code, connect GitHub sync (available on every plan) and, on a paid plan, keep a dated "Download codebase" ZIP as well. For the rest, save your images, environment variable names, custom domain DNS records and any database content separately. A repository plus a ZIP plus a notes file is enough to rebuild the site from scratch.
What a Lovable backup has to cover
A Lovable project is a normal React + TypeScript app styled with Tailwind CSS and shadcn/ui. Most of what you see on the page is in files. Those files are easy to back up.
The parts that are not in files are the parts people lose. Connected services, secrets and DNS live elsewhere. Write them down before you need them.
- Source code — pages, routes, components, Tailwind config,
package.json. - Assets — images, logos, fonts and anything in
public/. - Environment variables — names and values, including every
VITE_prefixed one. - Database content — if the project uses Supabase, its data is not in the repository.
- Domain and DNS — the registrar, the records and where they currently point.
- Content you only typed into the chat — copy text, prompts you want to reuse.
Back up the code with GitHub sync
GitHub sync is the backup we recommend first. It works on every Lovable plan, it updates as you work, and it gives you history rather than a single snapshot.
Once the repository exists, every change Lovable makes lands as a commit. You can clone it to your machine, and that clone is a second copy. For how the day-to-day loop behaves, see Lovable GitHub sync.
- Connect GitHub from your Lovable project and let it create the repository. The exact menu wording can change; Lovable's documentation has the current path.
- Check the first sync — open the repository on GitHub and confirm
src/,public/andpackage.jsonare there. - Clone it locally:
git clone <your-repo-url>so the code also exists off GitHub. - Keep the clone fresh with
git pullbefore any big change. - Tag releases if you want named restore points:
git tag launch-v1 && git push --tags.
Add a dated ZIP snapshot
"Download codebase" produces a ZIP of the project. It needs a paid plan. A ZIP is a frozen copy that does not depend on GitHub, your account or your connection to Lovable.
We treat the ZIP as the belt to GitHub's braces. Download one before each milestone: a redesign, a framework change, a domain move, or a migration to another host.
Name the files by date so the order is obvious, for example sitename-2026-09-14.zip. Store them somewhere that is not your laptop. Full steps for both routes are in how to export Lovable code.
- Before a redesign — so you can compare the old layout, or go back to it.
- Before launch — the exact code that went live.
- Before leaving Lovable hosting — the last known-good build.
- Quarterly — a routine snapshot, even if nothing big happened.
Check that the backup actually builds
A backup you have never restored is a guess. Test it once, on your own machine, and you will know it works.
The export is a normal project. Node 22, install, build. If dist/ appears and the pages render, your backup is complete enough to rebuild the site anywhere.
- Unzip or clone the backup into an empty folder.
- Install dependencies:
npm install. - Recreate the environment file — any
VITE_variable is baked in at build time, so a missing one shows up as a broken feature, not an error. - Build:
npm run build. The output lands indist/. - Preview the output with a local static server and click through every page.
- Note anything that failed — a missing key, a missing image, an API that only exists in the Lovable environment.
What a code backup does not restore
Be clear with yourself about the gaps. Code is only one layer of a live site.
Older apps built before 13 May 2026 are React + Vite and render in the browser. Lovable prerenders them on request for verified search engines, link-preview bots and AI crawlers, and that prerendering is part of Lovable hosting. Restore such an app on another static host and crawlers get an empty shell unless you add prerendering yourself. Lovable prerendering covers that in detail.
Apps created from 13 May 2026 use TanStack Start and are server-rendered, so every visitor and crawler gets full HTML wherever you host it.
- Supabase data — export it from Supabase; the repository holds only the client code.
- Secrets — API keys are values, not files. Keep them in a password manager.
- DNS — screenshot or export your records before you move a custom domain.
- Analytics and form submissions — they live in the third-party service, not in your code.
- Hosting behaviour — redirects, headers and prerendering depend on where the site runs.
A backup that is also an exit route
The same ZIP or repository you keep as a backup is the input to a platform move. That is worth knowing before you need it.
Our converter takes the Lovable ZIP or a GitHub repository and produces a WordPress block theme: templates, header and footer template parts, one pattern per page, theme.json with your palette and fonts, and your images copied into the theme. It runs in the browser, and the review screen shows the converted site next to the original in WordPress Playground. Conversion, review and the theme download are free.
It converts sections, grids, cards, type and color tokens, navigation, buttons, images, forms and page routes well. It approximates carousels, tabs and animations. It does not convert React state, authentication, Supabase or dashboards. Supported features lists all three groups.
Even if you never move, running a conversion gives you a second, independent copy of the design in a different format. That is a reasonable thing to have in an archive.
A backup routine you will actually follow
Keep it small. A routine with six steps gets skipped; one with three gets done.
We suggest this: GitHub sync on permanently, a dated ZIP at each milestone, and one plain text file listing everything that is not code.
- Always on — GitHub sync, plus a local clone you pull occasionally.
- At milestones — a dated ZIP in cloud storage.
- Once — a
restore-notes.txtwith env var names, DNS records, service logins and the build command. - Once a year — restore the backup into an empty folder and build it, to prove it still works.
FAQ
Does Lovable keep backups of my project for me?
Lovable keeps your project in its own platform, and the chat history records the changes you made. That is not the same as a backup you control. Keep your own copy through GitHub sync or a downloaded ZIP so the code exists outside the platform. Check Lovable's documentation for the current details of its version history.
Can I back up a Lovable site on the free plan?
Yes. GitHub sync works on every plan, so you can keep a full copy of the code in your own repository and clone it locally. The download codebase ZIP is the part that needs a paid plan. For most people the repository alone is enough.
How do I restore a Lovable site from a backup?
Clone the repository or unzip the archive into an empty folder, then run npm install and npm run build with Node 22. The build output in dist is static, so you can upload it to any static host such as Netlify, Vercel or Cloudflare Pages. Recreate your environment variables first, because VITE_ prefixed values are baked in at build time.
Is my Supabase data included in a Lovable backup?
No. The exported code contains the client that talks to Supabase, not the data itself. Export your tables from the Supabase dashboard and store that export alongside your code backup. Treat the two as one set, because restoring the code without the data gives you an empty site.
Can I use my backup to move the site to WordPress?
Yes. The IQDesk converter accepts the same Lovable ZIP or GitHub repository and produces a WordPress block theme. You install it under Appearance, Themes, Add New, Upload Theme, then activate it. Conversion, review and the theme download are free, but React state, authentication, Supabase and dashboards do not convert.