Guide
How to export Lovable code: GitHub, ZIP and download
Lovable gives you two ways to get your code out. Connect the project to GitHub, which works on every plan and keeps a two-way sync, or click Download codebase to save a ZIP, which needs a paid plan. Both give you the same standard React, TypeScript and Tailwind CSS project.
Which export method to use
| Method | Plan | What you get | Best for |
|---|---|---|---|
| GitHub sync | Every plan | A private repository that stays in two-way sync with Lovable | Ongoing work, developers, automatic deployments |
| Download codebase | Paid plans | A .zip of the whole project | A one-off handover, a backup, a converter |
| Download a single file | Every plan | One file from the code editor | Grabbing one component or asset |
Plan requirements as documented by Lovable in GitHub integration and View and edit your project's code, checked on 17 September 2026.
Export Lovable code to GitHub
- Open Project settings → Git → GitHub. The same option is in the chat's + menu under Connectors → GitHub.
- Click Connect next to the GitHub connection of your workspace. The first time, GitHub asks you to authorise Lovable.
- Lovable creates a new private repository and starts syncing. Every change you make in Lovable is pushed to it.
- To get a ZIP without a paid plan, open the repository on GitHub and use Code → Download ZIP.
How the sync behaves. Lovable syncs one branch at a time, main by default. Commits you push to that branch from your own editor come back into Lovable; commits on other branches do not. You can switch the synced branch or create a new one from the branch picker in the same settings screen.
Download Lovable code as a ZIP
- Open Project settings → Git and use the Download codebase section, or open the code editor and click Download codebase at the bottom of the file panel.
- Your browser saves the whole project as a
.zipfile.
The button needs a paid plan and edit access to the project. On Enterprise workspaces an admin can restrict it to admins and owners. On the free plan the code editor is read-only and only single files can be downloaded, so use the GitHub route above.
What is inside the export
A normal front-end project with nothing proprietary to unlock. What the folders look like depends on when the app was created:
- Apps created before 13 May 2026 are React + Vite:
index.html,src/main.tsx, routes insrc/App.tsx, one component per page insrc/pages. - Apps created from 13 May 2026 use TanStack Start with server-side rendering: file-based routes in
src/routes, with__root.tsxas the shared layout. - Both have
src/components(with the shadcn/ui pieces incomponents/ui), a global stylesheet with the design tokens as CSS variables, images inpublicorsrc/assets, andpackage.json.
If the app uses Lovable Cloud as its backend, the code expects the environment variables VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY and VITE_SUPABASE_PROJECT_ID. The database itself is not in the export; it stays in Lovable Cloud.
Run the exported project
npm install
npm run dev # local development server
npm run build # production build
Lovable recommends Node 22. For React + Vite apps the build writes the site to dist/, and VITE_ variables are baked in at build time, so set them before you build. The exact commands for your project are in the scripts section of package.json. Lovable's external deployment guide covers hosting the build elsewhere, and our Lovable hosting guide compares the options.
Common export problems
- There is no Download codebase button. You are on the free plan, or an Enterprise admin restricted downloads. Connect GitHub and download the ZIP there.
- Commits from your editor do not appear in Lovable. Check that you pushed to the synced branch. If GitHub's notification was missed, the commit shows up after your next push.
- Sync stopped after you moved the repository. Renaming a repository is safe. Transferring it to another owner, or renaming your GitHub account or organisation, breaks the connection; Lovable support can re-attach a transferred repository.
- You deleted the repository. Restore it on GitHub, or disconnect and reconnect in Lovable to create a new one.
What to do with the exported code
Most people export for one of three reasons:
- Keep building with developer tools. Clone the repository, work in your editor, and let the sync bring changes back into Lovable.
- Host it somewhere else. The build runs on Netlify, Vercel, Cloudflare Pages or your own server. See where to host a Lovable site.
- Move the site to WordPress. Drop the ZIP, or paste the repository URL, into the IQDesk converter. It turns the project into an editable WordPress block theme, shows it next to your published Lovable site so you can check every page, and lets you download the theme. Converting is free.
The full migration route, from export to an installed WordPress theme:
- Export the code with either method above.
- Copy the published address of your Lovable site (
yourproject.lovable.appor your custom domain) for the side-by-side comparison. - Load the project in the converter and choose which pages, products and forms to convert.
- Review each page against the original; ask the AI agent to fix what differs.
- Download the theme ZIP, then in WordPress go to Appearance → Themes → Add New → Upload Theme, activate it and open the home page once.
FAQ
Can I export Lovable code on the free plan?
Yes, through GitHub. Connecting a project to GitHub works on every plan, and GitHub lets you download the repository as a ZIP. The Download codebase button inside Lovable needs a paid plan; single files can be downloaded on any plan.
Do I own the code I export from Lovable?
Lovable's documentation says you can clone the repository, modify it outside Lovable, deploy it on your own infrastructure or fully self-host without restriction.
Does exporting stop the project working in Lovable?
No. GitHub sync is two-way, so you can keep building in Lovable and in your editor. If you disconnect GitHub, the repository stays where it is and syncing simply stops.
Can I sync Lovable with GitLab or Bitbucket instead?
Lovable documents Git sync for GitHub, GitLab and Bitbucket. GitHub is the one available on every plan; check Lovable's Git sync page for the others.
Is the exported code a WordPress site?
No. It is a React app. To run it as WordPress, convert it into a block theme; IQDesk does that from the same ZIP or repository.
How do I migrate the exported site to WordPress?
Load the ZIP or the GitHub repository into the IQDesk converter, review the converted pages next to your published Lovable site, then download the block theme and upload it in WordPress under Appearance → Themes. Nothing keeps running on Lovable after the move.