Skip to main content
Claim your .com from $2.99 — free WHOIS privacy included

Learning Hub · Advanced · 45 minutes of setup

How to Deploy a Site With Git

Push-to-deploy replacing drag-and-drop forever — a practical, no-jargon walkthrough with the classic mistake flagged before you make it.

The short answer

In one line: push-to-deploy replacing drag-and-drop forever — a advanced-level job taking 45 minutes of setup.

The walkthrough below covers each step, the mistake most people make, and the shortcut worth knowing. On HostingAlly plans, several of the steps are handled for you — we note where.

Advanced

Skill level

5

Steps to done

Free

Support included

Tested

On our platform

This guide assumes no prior expertise — just a hosting account, a browser, and 45 minutes of setup of attention. Every instruction works on our platform exactly as written, and translates to any standard cPanel host.

One promise before starting: nothing in this guide is irreversible. Where a step could bite, we say so and give the undo.

The shape of the job

Start to finish, you'll repository first, clone on the server, deploy by pull, automate the pull and keep rollback one command away.

None of the stages requires code or a terminal unless the guide explicitly says so — and where it does, the exact commands are given. The full step-by-step sits below; the surrounding sections cover the context that makes it stick.

The mistake almost everyone makes

Committing credentials and config secrets to the repository — the .env file that reached a remote repo is compromised by definition; secrets live outside version control (ignored files, environment variables) from commit one.

It's worth internalising because it's not a rare edge case — it's the single most common way this task generates a support ticket. Knowing it in advance converts the whole job from risky to routine.

The pro tip worth stealing

Tag releases (v1.0.1 style) rather than deploying from a moving branch — rollback targets become named and deliberate, and 'what's live right now' always has an exact answer.

Small habits like this are the real difference between people who find hosting easy and people who find it stressful — the tools are identical; the workflow isn't.

How HostingAlly makes this easier

Several steps in this guide exist because hosting historically made you do them — on our plans, SSL issues itself, backups run daily without being asked, and one-click installers replace manual setup entirely. What remains is the genuinely-yours part of the task.

And when a step misbehaves anyway, support answers around the clock — with the actual fix, not a knowledge-base link and a shrug. Half our best guides started as patterns in the tickets.

Programmer writing code on a hosted server environment

The platform this guide assumes

Every walkthrough in our Learning Hub is tested on the platform we actually run — cPanel, LiteSpeed, NVMe, one-click installs — so instructions match your screen instead of gesturing at it.

Support is answered by real people around the clock — including the questions other hosts call out of scope.

  • Step-by-step, tested as written
  • The gotcha flagged before you hit it
  • Automation covers the boring steps
  • 24/7 support if you get stuck

Why HostingAlly

What you get with every plan

The undo is always named

Where a step could bite, the guide says so and gives the reversal.

Automation where it belongs

SSL, backups and installs run themselves here — the guide covers only what's genuinely yours to do.

Works as written

Every step tested on our own platform — no 'your host may vary' hand-waving.

Help on standby

Stuck at step three at midnight? Support answers around the clock, mid-guide included.

No jargon tax

Terms are explained in place or linked to the glossary — nothing assumes you already know.

Written from real tickets

Our guides come from the support desk — the gotchas are the ones people actually hit.

Getting Started

How to get going

  1. 1

    Repository first

    The site's code in Git with a sane .gitignore (no secrets, no uploads directory) — deployment discipline starts with repository discipline.

  2. 2

    Clone on the server

    Over SSH, clone into the document root (or a releases directory) — the server becomes a checkout, and its state becomes knowable.

  3. 3

    Deploy by pull

    git pull on the server updates to the pushed state — two commands (local push, server pull) replacing the file-picker archaeology of FTP.

  4. 4

    Automate the pull

    A webhook endpoint or post-receive hook triggers the pull on push — push-to-deploy proper, with the deploy script also running builds where needed.

  5. 5

    Keep rollback one command away

    git checkout of the previous tag reverts the site in seconds — the capability that changes deployment psychology entirely.

Included

What's covered on our plans

  • Daily automatic backups with self-service restores
  • 99.9% uptime commitment, monitored around the clock
  • SSH, Git and Composer access on developer-friendly plans
  • Free SSL certificate on every plan, renewed automatically
  • No setup fees, ever
  • NVMe SSD storage as standard
  • Per-site PHP version selection
  • cPanel — the industry-standard control panel
  • Free website migration handled by our team
  • DDoS protection at the network level

FAQ

Your questions, answered

Does Git deployment work on shared hosting?

Yes — our plans include Git and SSH, so clone-and-pull works exactly as on a VPS. The hook automation options vary by environment; the core workflow (push, pull, rollback) is fully available.

What about the database and uploads — does Git handle those?

No — Git versions code, not data. Databases follow their own backup/migration path, and uploads sync separately (rsync or stay server-side). The trio (code via Git, data via backups, media via sync) covers the whole site deliberately.

Are backups included, and can I restore them myself?

Daily automatic backups are standard, restorable from the panel in minutes — files, databases or both, at 3am without a ticket if that's when you need it. For extra cover, you're welcome to run your own offsite copies alongside.

Do you include email with hosting?

Yes — mailboxes on your own domain come with every hosting plan, with webmail, IMAP/POP/SMTP access and spam filtering. Standalone email hosting also exists for domains whose websites live elsewhere.

Do prices go up at renewal?

No — the price you sign up at is the price you renew at. We don't run teaser-rate economics, so there's no year-two ambush to plan around, and your bookkeeping can rely on the number staying put.

How long does it take to get started?

Minutes — hosting activates on payment, the domain (free for year one on annual plans) connects immediately, and one-click installers put WordPress or 400+ other apps live the same sitting. If you have an existing site, our team migrates it free, usually within 24 hours.

Is SSL really included at no cost?

On every plan, with no exceptions — certificates are issued automatically when your domain points to us and renew themselves before expiry. The encryption is identical to paid DV certificates; paid tiers exist only for wildcard convenience or organisation-level validation.

Get online without the games.

From your first site to a fleet of servers, the upgrade path is an account change, not a migration.

See Hosting Plans