How to fix changes not showing after a Node.js deployment at Hostinger

Find out why a deployed Node.js website still shows the old version, and fix it.

Updated 16 hours ago

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:

NOTE

  • Use the Deployments page, not the File Manager’s Last modified column, to confirm when a deployment went live. Files extracted from a .zip archive keep their original timestamps.

Step 2 – Check the deployment settings

Click Settings and redeploy and confirm that these settings match your project:

Step 3 – Clear the caches

Caches can keep serving the previous version after a successful deployment. Clear them in this order:

  1. Purge the CDN cache in the Hostinger dashboard, as described in Hostinger CDN: How to clear the cache.
  2. Open the website in an incognito or private browser window.
  3. 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.