Roll back to an earlier Node.js deployment
Restore a working code version and understand how rollback affects environment variables and the database.
In this guide
Check what rollback covers
Deployment rollback rebuilds the selected commit. It uses current environment variables and does not undo database changes. If a newer version changed the database schema, check compatibility with the old code before rolling back. You need website management permissions.
Restore the earlier version
- Open the website and Deploys. Find the last known working version by commit identifier and time.
- If you want to prevent the next GitHub push from replacing your rollback, temporarily disable automatic deployment in Settings.
- Select Roll back for the chosen deployment. The button appears only for eligible deployments.
- Read the confirmation: the code is fetched again and rebuilt with current settings. Confirm the rollback.
- Follow its progress and wait for the selected version to become live.
Verify the result
Test the original problem, login and reading and saving data. Check the log for compatibility errors. Fix the problem in the GitHub deployment branch too, so the next deployment does not reintroduce it.
If rollback fails
Wait for any deployment in progress to finish and make sure the application is not stopped. The selected commit must still be available on GitHub. If the button is missing, choose another eligible deployment. To restore the database or a broader service state, follow the backup guide or contact support.
