โ† Back to Blog
How I Set Up Auto Deployment on Hostinger (And Why I Wish I'd Done It Sooner)

How I Set Up Auto Deployment on Hostinger (And Why I Wish I'd Done It Sooner)

I manually dragged files into Hostinger's file manager for way too long. Turns out they support GitHub auto-deploy and it takes about 10 minutes. Here's the exact setup, step by step.

01Something embarrassing I kept doing

For way longer than I'd like to admit, my deployment process was: open Hostinger file manager, navigate to the folder, delete old files, upload new ones. Sometimes I used FTP which felt marginally better but was still manual.

I knew auto-deployment was a thing. I assumed it would require setting up webhooks, configuring a CI pipeline, or something time-consuming. It doesn't. Hostinger has built-in Git integration and it takes about 10 minutes to set up.

02What you need

A Hostinger hosting account with hPanel access, a GitHub repository with your project, and basic git knowledge (committing and pushing). That's it.

One thing I'd add: make sure your repository is in a working, clean state before you connect it. The first time I did this I connected a branch I'd been experimenting on and spent 20 minutes confused about why the live site looked broken.

03Step 1 โ€” Find Git in hPanel

Step 1 โ€” Find Git in hPanel

Log into Hostinger, open your website's hPanel dashboard, and search for "Git" in the search bar at the top. Click the Git section.

hPanel has a lot of options and it's easy to get distracted. Just search "Git" and go directly there.

04Step 2 โ€” Connect your repository

You'll see fields for repository URL, branch, and install path. Paste your GitHub repo URL. Set the branch to whichever branch you actually deploy from โ€” don't assume "main" without checking.

Install path is where the files will land on your server. For most projects, root / is fine. If you deploy to a specific folder, use that. When unsure, leave it as root and adjust if something's off.

05Step 3 โ€” Enable Auto Deployment

Step 3 โ€” Enable Auto Deployment

There's a toggle labelled Auto Deployment. Enable it.

This tells Hostinger to watch your connected branch. Every time you push to GitHub, Hostinger detects it and pulls the new code. No clicking, no logging in, no file manager ever again.

06Step 4 โ€” Test it

Your deployment process is now your normal git workflow. Make a change, commit, push to the connected branch. Check the live site in a minute or two.

The first time this worked for me I made a minor CSS change and the site updated automatically. I kept refreshing expecting something to go wrong. Nothing did.

07If something looks off โ€” check the logs

Hostinger shows deployment logs showing exactly what happened when it pulled your code. If the site isn't updating or something looks wrong, start here.

The most common issues: wrong branch name (pushed to dev, connected to main), wrong build folder (your built files are in /dist but Hostinger is serving from root), or a missing dependency. The logs usually make the problem obvious.

08A couple of things I learned the hard way

Don't push to your connected branch when you're mid-experiment. If you're noodling with something locally, a push now means it's live. I broke a project's public site this way. Not fun.

If you have a build step โ€” React, Vite, Next.js โ€” make sure Hostinger is pointed at the output folder, not the source files. You push your source, but the built /dist folder is what actually gets served. Sort that out before wondering why changes aren't showing up.

Abhinav Sinha

Written by

Abhinav Sinha

Full-Stack Developer & AI Tools Builder. I write about AI tools, SEO, blogging strategies, and developer workflows โ€” based on what I actually use and build.