Git
Deploy your website from a Git repository on Hostinger using GitHub auto-deployments or SSH-based deployment, with branch setup and troubleshooting tips.
Deploy your site from a Git repository. Push to the connected branch and Hostinger pulls the latest files into your chosen directory — no manual uploads, no SSH.
Note: This is the generic Git feature for any website: static HTML, PHP apps, WordPress custom code — anything that runs what's in the repo as-is. For Node.js apps that need to run a build step (install deps, run
npm run build, start the server), use the Node.js-specific GitHub integration instead.
What it does
Pulls files from your repo into a target directory on your site
Replaces existing files in that directory on each deploy
Does not run a build step — the files committed to the repo are the files served
Two ways to connect
Providers
GitHub
Any Git host (GitHub, GitLab, Bitbucket, …)
Auth
Hostinger GitHub App
Deploy SSH key
Auto-deploy
On by default (webhook managed for you)
Manual webhook setup
Where
Advanced → Git
Advanced → Git (shown if you have an SSH key set up)
New connections should use GitHub auto-deployments. The SSH flow remains available for non-GitHub hosts and existing setups.
GitHub auto-deployments
Connect a repository
Open your website dashboard in hPanel and go to Advanced → Git.
Click Connect with GitHub — a popup installs the Hostinger GitHub App on your account. Choose which repositories to grant access to.
Pick the repository to import. Use Refresh repositories or check your GitHub access settings if one is missing.
Configure the deployment:
SettingDescriptionBranch
The branch that triggers deployments
Deploy directory
Root (
public_html) by default, or click Change to deploy to a subfolder likepublic_html/blogClick Deploy for the initial deployment. Progress and logs stream live.
Automatic deployments
Once connected, every push to the selected branch deploys automatically:
You push to the connected branch.
GitHub notifies Hostinger via webhook.
Hostinger pulls the latest code.
Files are replaced in the deploy directory.
No build step runs — what's in the repo is what gets served. The website dashboard shows an Auto-deployment chip while the connection is healthy.
Manual deployment
Click Redeploy on the Git page's Overview tab to pull the latest code on demand. History lists it as a "Manual deployment" (no commit attached).
Deployment history
The Deployments tab lists recent deployments — branch, commit, time, and status (Deploying / Completed / Build failed), with the live one labeled Current. Click a row for the full deployment log. Logs from recent deployments are retained; older ones are pruned.
Connection status and disconnecting
The Overview tab shows the same connection states as the Node.js integration — connected, not connected, different GitHub account, or repository access missing — with a one-click fix for each. From the menu you can:
Disconnect from repository — stops deployments for this site only; your GitHub account stays connected.
Disconnect GitHub — removes the installation; deployments stop for all sites connected to that account. Already-deployed files stay in place.
SSH-based deployment (legacy)
Works with any Git host. Shown on the Git page for accounts that have a deploy SSH key.
Private repos: click Generate SSH Key, copy it, and add it as a deploy key on your Git host (GitHub, GitLab, Bitbucket, etc.).
Add the repository: enter the repository URL (
https://...gitfor public,git@...:...gitfor private), the branch, and the target directory. Leave the directory blank to deploy topublic_html— the target directory must be empty for the first deployment.Deploy: use the repository's actions menu — Deploy pulls the latest code; View latest build output shows the last deployment log.
Auto deployment: the Auto Deployment action shows a webhook URL. Add it as a push webhook in your Git host's repository settings, and every push triggers a deploy.
To remove a repository, use Delete in its actions menu.
Branch strategy
Deploy
mainfor simple, always-live workflows.Use a dedicated
productionbranch to batch changes and control what ships.For preview workflows, deploy a testing branch to a separate site on a free subdomain before merging to the live branch.
Troubleshooting
Deployments not triggering on push GitHub auto-deployments: confirm you're pushing to the connected branch and the connection status is healthy (no account mismatch or missing repository access). SSH-based: verify the webhook URL is configured on your Git host.
Files not updating after deployment Review the deployment log for errors. If caching is enabled, clear the cache to force fresh content.
GitHub lost access The Git page shows Repository access missing — click Manage access to restore the Hostinger app's repository access in GitHub, or reconnect from hPanel if the installation was removed.
SSH deployment fails on first pull The install directory must contain no files or folders. Clear it (or pick an empty subdirectory) and deploy again.
My project needs a build step This feature serves files as-is. For Node.js apps that need npm install and a build, see GitHub under Node.js.
Last updated: July 22, 2026
Last updated
Was this helpful?