When Node.js changes are not showing after a deployment at Hostinger, there are six common causes: the deployment didn’t run or failed, the build settings point to the wrong place, a cache serves the old version, a build-time environment variable wasn’t rebuilt, an old app process is still running, or only one of domain.tld and www.domain.tld is updated. Go through the steps below in order.
Fix Node.js changes not showing after a deployment
Step 1 – Check that the new deployment ran
Open the website dashboard of your Node.js app and go to Deployments. Look for a deployment of your latest change and check its status:
- No new deployment: the change didn’t start a deployment. For GitHub deployments, follow the GitHub connection steps in the FAQ of how to add a Node.js web app in Hostinger, and check that Hostinger can access the repository, as described in how to update GitHub repository permissions for Node.js hosting. For ZIP deployments, upload the new
.zipfile when you redeploy the Node.js application. - Failed deployment: the previous version stays live. Open the build logs to find the cause, as described in how to troubleshoot Node.js deployment build errors at Hostinger.
NOTE
- Use the Deployments page, not the File Manager’s Last modified column, to confirm when a deployment went live. Files extracted from a
.ziparchive keep their original timestamps.
Step 2 – Check the deployment settings
Click Settings and redeploy and confirm that these settings match your project:
- The branch you pushed your change to.
- The root directory, especially in a monorepo. See how to deploy monorepos with npm, yarn or pnpm on Hostinger.
- The build command, output directory and entry file.
Step 3 – Clear the caches
Caches can keep serving the previous version after a successful deployment. Clear them in this order:
- Purge the CDN cache in the Hostinger dashboard, as described in Hostinger CDN: How to clear the cache.
- Open the website in an incognito or private browser window.
- Clear the site data in your browser if the website is a Progressive Web App (PWA) or uses a service worker, because the service worker can serve the old version.
Step 4 – Redeploy after changing build-time environment variables
Redeploy the app if you changed an environment variable that starts with NEXT_PUBLIC_ or VITE_. These variables are added to the app during the build, so a restart doesn’t apply them. See how to edit or add environment variables after deployment.
Step 5 – Restart the app
Restart the app from the website dashboard by clicking Running and selecting Restart. An old copy of the app can keep running in the background and serve the previous build. If the restart doesn’t help, open the Resource Usage page and click Stop running processes.
Step 6 – Check both domain.tld and www.domain.tld
Open both domain.tld and www.domain.tld. Each version of the domain runs a separate process, so one can show the new version while the other still shows the old one.
After these checks, your Node.js website shows the latest deployed version. If a deployment keeps failing, the build logs point to the exact step that needs fixing.