Updating the app
Recommendation: don't merge template updates into an app that's already in motion. We’ll outline the reasons below and, if you choose to go ahead, a lightweight guide to update safely.
Why avoiding merges is usually safer:
- Template changes are often coupled. Pulling in one change without the related ones can break things.
- Your project likely uses a specific Wasp version. New template code may target a different version.
- The more your app has diverged, the harder and riskier it is to merge.
- Even if you only want a single new feature, you may end up refactoring multiple areas to make it work.
If you still need a change there are 2 viable paths.
Pre-flight checklist for either path:
- Confirm your current Wasp version in
main.wasp
and note it in the PR. - Back up your database and
.env
files. - Open a feature branch and plan a rollback.
- Write a short upgrade plan listing files you will touch.
Path A - Bring template changes into your existing project
Best when your app has not diverged much.
- Create a new git branch for the update.
- Review recent template commits and PRs to understand what changed and which Wasp version they target.
- Cherry-pick or copy only the minimal files you need. Prefer small, isolated diffs over bulk merges.
- Align versions. If the template change requires a newer Wasp version, update the wasp version in
main.wasp
and upgrade dependencies, or backport the change to your current version. - Reconcile schema and migrations. If Prisma entities changed, run
wasp db migrate-dev
locally and verify data safety. - Rewire env vars. Add any new variables to
.env.server
or.env.client
as needed. - Run the full suite. Start the app, run
e2e-tests
, exercise the affected flows, and check logs.
Path B - Port your app into a fresh template
Best when your app has diverged a lot or you want multiple new template features.
- Scaffold a fresh project from the latest template.
- Match the Wasp version noted in the fresh template and keep it.
- Copy your business logic in layers: routes and pages, operations, server utils, UI components - one feature at a time.
- Recreate schema changes and run
wasp db migrate-dev
. - Bring over config and env vars. Keep names consistent.
- Reinstall only the dependencies you actually use.
- Run the app and
e2e-tests
. Verify payments, auth, file upload, and admin dashboard.
Post-upgrade checks
- App boots locally and on your staging environment.
- Auth works for email and any social providers you use.
- Webhooks process events end to end.
- Admin dashboard loads analytics.
- No missing env vars at runtime.
e2e-tests
pass.
Rule of thumb
If a change feels like it requires more than a few small, targeted diffs, use Path B. It is often faster and safer than wrestling with a complex merge.