Deployment
Release the version you checked through a preview and quick smoke tests (checks that the basics work), with clear settings, data safety, an owner, and a way back.
Content date: October 15, 2026.
Plain English
Deployment puts a built product where users can reach it. That place has its own runtime, settings, networking, storage, and credentials, and they may differ from your computer. A live URL or a running process does not prove that the main task works for a user. A release decision ties together the version, the checks it passed, who can see it, and the plan for undoing it.
Use this when
Do this before your first preview, before users depend on a release, and whenever the host, settings, database structure, or outside services change.
If you are just starting
Start with a clearly labeled local preview and made-up data. Find out whether your project is a static site (plain files) or needs a running server. Then read the host's current instructions for your framework and account. Write down the root folder, build command, output folder, and start command. Note which settings are public and which are server-only, and what you assume about stored data. Leave domain and paid hosting purchases out of the free starter exercise. The Vite preview command is for looking at a build on your own computer and is not a production server.
When your project grows
Test the real production build in a protected preview, where your host offers one. Check the main user tasks, deep-link refreshes, API limits, denied access, and failure behavior. Confirm the domain and TLS (the lock that secures web traffic), logs, health checks, cost limits, and who responds when it breaks. Plan database changes (migrations) so old and new code both work during the switch. Rolling back code does not undo data changes or messages already sent. Hosts differ. As of October 2026, Vercel's Instant Rollback on the Hobby plan only goes back to the immediately previous production deployment and does not change environment variables. On Netlify, rolling back means publishing an older deploy, and a new Git push replaces it unless you lock the deploy. Set clear triggers for rolling back, and keep the previous build easy to find.
Worked example
In the local practice, the script rejects a misleading form, releases a harmless heading change, and then restores the baseline file. Browser checks after restoring show empty and invalid input handled, a demo-only success message, and Clear moving focus back to Name. The restored file matches the saved baseline byte for byte. That proves a small static-file rehearsal. No hosted rollout, database change, email reversal, or multi-server recovery happened.
Practice
Release and restore a checked local artifact
- Run the practice script with its local server and try the baseline form using the supplied form checks.
- Open the broken version, notice its false "sent" claim, and record a decision to block that release.
- Open the second release and the restored baseline, repeat the baseline checks after recovery, and compare the file hashes.
- Fill in the shared readiness report with the version, environment, observations, rollback trigger, owner, and open gaps.
- Write your real host's checklist for preview, rollout, database changes, and rollback from its current documentation. Run it only on a target you are authorized to use, and keep unperformed hosted steps marked pending.
Deliverable: A local release-and-restore report plus a host-specific deployment plan that separates the checks you finished from the rollout and data work still to do.
Common mistakes to watch for
- Preview and production use different settings, and nobody rechecked after the switch.
- A host's temporary disk is mistaken for permanent storage, so uploaded files vanish at the next deploy.
- A smoke test that only opens the home page misses a broken booking link or API.
- A team expects a rollback to undo a dropped database column or the emails already sent.
Prompting
A weak prompt
Deploy it wherever is easiest, and if anything breaks we'll just revert the commit.
A better prompt
Find the current supported hosting path for [framework] on [host], and list the build output, settings, storage, and database changes this project needs. Walk me through a preview, smoke checks (including a deep-link refresh and a denied-access check), rollout, and rollback, with the trigger and owner for each. List outside effects a rollback cannot undo. Say which checks ran locally and which on the host, and do not call it deployed because a build finished or a URL loads.
Most painful launches fail between "the page loads" and "customers can finish their task, and we can undo it safely."
Check before you move on
- The exact build and the target host are written down.
- Settings and where data is stored are clear.
- The preview covered a real user journey and a denied-access check.
- Database changes work with both the old and new code.
- A rollback was tried at the scope you claim.
You are done when
- The restored form matches the saved baseline file exactly and behaves as expected in the browser.
- You can explain why rolling back code is not enough when the database structure changed or a message was already sent.
Questions to think about
Your new site's process is running and the home page loads. Can you call the deployment a success?
Not yet. You still need to check the important user journeys, deep links, assets, and API limits, and what happens when access should be denied or something fails.
A release drops a database column and sends receipts by email. You revert the code. Is everything back to normal?
No. The data and the sent emails do not come back with the code. They need a database restore plan and a way to reconcile or correct the messages.
You rehearsed releasing and restoring a file on your own computer. Does that prove your host's production rollback works?
No. It shows the idea with a simple file. Your host's own rollback and any stored data need to be tried and documented separately.