This document shows how to prepare and upload your static site build (Vite) to Hostinger (Apache). It assumes your project root contains a dist/ folder produced by npm run build.
scripts/zip-dist.ps1: PowerShell helper to createdist-deploy.zip(Windows)scripts/zip-dist.sh: Bash helper to createdist-deploy.zip(macOS / WSL / Linux)public/.htaccessis already present and will be copied todist/by the build; thedist/folder includes.htaccess.
Run from project root:
npm install
npm run buildChoose one of the scripts below depending on your environment.
Windows PowerShell (run in project root):
.\scripts\zip-dist.ps1Bash / WSL / macOS:
bash scripts/zip-dist.shAfter running the script you should have dist-deploy.zip in the project root. This zip contains the contents of dist/ (not a parent dist folder).
- Log into Hostinger hPanel.
- Go to Files → File Manager.
- Open
public_html. - If you have old site files you want to replace, back them up then delete them from
public_html. - Upload
dist-deploy.zip(drag & drop or Upload button). - Select the uploaded
dist-deploy.zipand use theExtractaction so files are extracted intopublic_html. - Confirm that
index.html,assets/,.htaccess, and other files are directly insidepublic_html.
Important: Do NOT upload the
dist/folder itself-upload its contents (the zip we created does this).
- Visit your domain (e.g., https://yourdomain.com). The site should load.
- Test internal routes (e.g.,
/topics/present-simple) and refresh to confirm SPA routing. If you get 404s on refresh, ensure.htaccessexists inpublic_htmland contains the rewrite rules. - Open Developer Tools (F12) → Console to check for JavaScript errors and Network tab to see any missing files.
- If the site is blank (dark screen):
- Check browser Console for JS errors.
- Check Network tab for failed requests (404/403). Missing
assets/*.jsindicates files are not inpublic_html.
- If you have 404s on page refresh: verify
.htaccessis present and Apachemod_rewriteis enabled on the server (Hostinger supports it by default).
-
index.htmlexists indist/ -
assets/folder exists indist/ -
.htaccessexists indist/ -
public/images/blog/ielts-writing-guide-2026.jpgexists (we confirmed it is inpublic/images/blog) -
dist-deploy.zipcreated from dist contents
- Connect to Hostinger with FTP credentials.
- Navigate to
public_html. - Upload files from local
dist/(or uploaddist-deploy.zipand extract via File Manager).
If you want, I can now:
- Mark the task as complete in the todo list.
- Provide a short upload checklist you can open on your phone while uploading.
- Walk you through Hostinger File Manager steps while you do the upload.
Tell me which of these you'd like next.