- Test: Your development environment. Lovable always builds in Test when Test and Live environments are enabled.
- Live: Your production environment. This is what real users interact with. Only updated when you explicitly publish.
- Experiment with new features and schema changes
- Test integrations, workflows, and edge functions
- Avoid unintended changes to production data
Prerequisites
- The project must use the built-in backend (Cloud).
- You must publish at least once to create a Live database before enabling Test.
How it works
When you enable Test and Live environments, Lovable creates a Test database alongside your Live (production) database. The following is copied from Live to Test only once, on setup:- Database schema
- Database data
- Cloud configuration
- Lovable always builds in Test, never in Live
- While building in Test, Lovable can reference context from Live to help debug issues, but never modifies Live data
- Test and Live environments evolve independently
- Application code and database schema are synced through publishing
- Database data and cloud configuration are never shared, reset, or overwritten
- Publishing syncs structure, not content
Before each publish, Lovable automatically creates a backup of your Live database. This ensures you can recover production data if something unexpected happens during or after publishing. Contact support if you need help restoring a backup.
*Safe schema migrations that should not cause data loss (for example, adding tables or columns) are applied to Live automatically on publish.
Data migrations (moving or transforming existing data) are not run automatically. If a change could risk data loss, Lovable:
- Explains the situation
- Provides an SQL query
- Asks you to run it manually in the SQL editor
Enable Test and Live environments
Test and Live environments are closed to new projects. On projects that enabled the feature before March 24, 2026, enablement ran through the Test/Live selector on the Cloud Overview.Test and Live Cloud view
When you enable Test and Live environments, you can switch between Test and Live in the Cloud view to inspect data and settings. This selector only controls what you’re viewing, not where Lovable builds.Branded and transactional emails aren’t supported on projects using Test and Live environments. To use emails, delete the Test database first.
Remove the Test database
You can delete the Test database from Cloud tab → Overview → Advanced settings → Danger zone. This action:- Deletes all Test data
- Disables the Test and Live environments feature
- Does not affect Live data