Fix an AI-Built Website or Web App That Works Locally but Breaks Live
Find and fix production-only problems when your AI-built website or web app works locally but stops working correctly after deployment.
Roadmap & Resources
Find What Breaks Live
Reproduce the Problem on the Live Site
Start on the live version, not in your project. You only need to know what fails — not why.
Open the live website or web app Reproduce the broken feature once Note what you expected to happen and what actually happened
Let AI Find the Cause
Open your AI coding assistant inside the project and describe what you just saw. It inspects the project for you.
Inspect the Live Problem
Inspect the project and the live failure, then identify the most likely production-only cause without changing anything yet.
This project works locally, but something is failing after deployment. Inspect the current project and help me diagnose the production-only problem. First, do not change any files. Identify: - Which part of the app is failing - What the feature depends on - What is different between local development and production - The most likely root cause - What evidence supports that conclusion Check relevant areas such as: - Environment variables and secrets - API or backend URLs - Authentication redirect or callback URLs - Database or service configuration - Client-side versus server-side behavior - Build or production configuration - Routes and base paths - CORS or allowed origins, if relevant Do not list generic possibilities if they do not apply to this project. Find the most likely real cause based on the code and current setup. Do not fix anything yet. When finished, explain the problem in simple language and tell me what needs to change.
Read the explanation it gives you before moving on. The next step builds on it.
Check the Production Setup
Confirm the Exact Mismatch
A problem that only happens live is a difference between your computer and production. This step proves which difference it is.
Compare Local and Production
Compare what the project expects locally with what the live deployment actually provides and confirm the exact mismatch.
Using the diagnosis from the previous step, compare this project's local setup with what it needs in production. Check only the configuration relevant to the broken feature. Verify things such as: - Required environment variables exist in production - Production URLs are correct - Redirect and callback URLs use the live domain - Server-side code is actually running server-side - External services allow the production domain - Required secrets are not missing or exposed - Build and runtime settings match the project Do not redesign the project. Do not add new features. Do not perform unrelated cleanup. Tell me the exact mismatch you found and the smallest safe fix required. Do not apply the fix yet.
You should now have one confirmed cause and one planned fix. That is all the next step needs.
Fix the Real Cause
Apply the Smallest Safe Fix
Now let it make the change — only the one it just confirmed.
Fix the Production Issue
Apply the smallest safe fix for the confirmed production problem without changing unrelated parts of the project.
Fix the production issue we identified. Apply only the changes required to solve the confirmed problem. Requirements: - Keep existing working functionality unchanged - Do not redesign the interface - Do not refactor unrelated code - Do not add new features - Do not expose secrets in client-side code - Keep local development working where possible If the fix also requires a production setting outside the code, clearly tell me what setting must be updated. After making the fix, summarize: - What caused the problem - What you changed - Whether anything must also be changed in the deployment settings Do not make unrelated improvements.
If it tells you a setting has to change outside the code, make that change yourself before you redeploy.
Redeploy and Test Live
Redeploy the Corrected Project
Publish the fixed project the same way you published it the first time — nothing about your deployment workflow changes here.
Test the Exact Thing That Failed
Check the live version yourself before asking the AI anything.
Open the live site
Repeat the exact action that failed before
Confirm the expected result now works
Refresh the page and try it once more
Have AI Verify the Live Fix
Now let it confirm the same result, and handle anything that is still wrong.
Verify the Live Fix
Check the live deployment and confirm that the original production-only problem is actually fixed.
Check the live deployment after the fix. Focus on the original problem we diagnosed. Verify: - The previously broken feature now works - The live app is using the correct production configuration - There are no obvious runtime errors related to the fix - The fix did not expose any secret or sensitive value - The same core flow still works after a page refresh If the original problem still exists, inspect the current live behavior and relevant deployment information again. Do not guess. Identify what is still wrong and fix only that issue. Do not redesign or add new features. When finished, tell me whether the original production problem is resolved.
Quick Check Before You Finish
A quick look at the parts closest to the fix. No prompt needed — just click through the live app.
Homepage still loads
Main navigation works
The feature you fixed still works
One closely related core feature still works