Available for Cloud projects and free during Beta. Pricing will be decided at a later point.
- 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 Lovable 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.
| Application component | Description | Synced on publish and shared between environments? |
|---|---|---|
| Application code | Your app’s logic (frontend, backend, edge functions), which defines how your app works. Built in Test | Yes |
| Database schema | The structure of your database (tables, columns, indexes, migrations). Built in Test | Yes* |
| Database data | The contents of your database (rows, users, records, uploads). Environment-specific | No |
| Cloud configuration | Environment settings like auth, secrets, environment variables, integrations, and features. Environment-specific | No |
- Explains the situation
- Provides an SQL query
- Asks you to run it manually in the SQL editor
Enable Test and Live environments
To enable Test and Live environments, follow the steps below:- Go to Cloud view → Advanced settings.
- Select Enable Test and Live environments option.
- Complete the onboarding flow.
- Click Enable Test and Live environments button.
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.Remove the Test database
You can delete the Test database from Cloud → Advanced settings → Danger zone. This action:- Deletes all Test data
- Disables the Test and Live environments feature
- Does not affect Live data