- Still uploading ZIP files to production?
- cPanel has shipped Git deployment for years.
- This guide walks Nepali developers through repository setup, .cpanel.yml and push-to-deploy workflows.
Manual uploads are how files go missing, half-finished changes reach production, and nobody knows which version is live. cPanel โ standard on nearly all Nepali shared hosting โ includes Git Version Control, letting you deploy the same way professional teams do: from a repository.
What cPanel Git Deployment Gives You
- Clone repositories from GitHub, GitLab or Bitbucket onto your hosting account
- Pull updates with one click or a single SSH command
- Run a deployment recipe โ the .cpanel.yml file โ that copies files into your web root
- A complete history of what changed and when, with instant rollback via checkout
Step 1: Connect Your Repository
- In cPanel, open Git Version Control and click Create.
- Paste the clone URL. For private repositories, generate an SSH key in cPanel Terminal, add the public key to your Git provider, and use the SSH clone URL.
- Choose a repository path outside public_html, for example repositories/mysite.
Step 2: Add a Deployment File
Commit a file named .cpanel.yml at the repository root. In it, define tasks that copy your built files from the repository into the correct document root โ cPanel runs those tasks after every deployment. Typical tasks copy the project files with rsync-style commands and set permissions.
Step 3: Deploy
- Push changes to your remote as usual from your laptop.
- In cPanel Git Version Control, click Update from Remote, then Deploy HEAD Commit.
- Prefer the terminal? SSH in and run the pull and deploy from the repository directory.
Leveling Up: Automatic Deployments
Add a webhook or a small CI job (GitHub Actions works well) that connects over SSH and triggers the pull on every push to your main branch. From then on, merging to main is deploying โ a workflow many Kathmandu agencies now run on ordinary shared hosting costing NPR 1,000โ2,500 per month.
Practical Rules
- Never commit .env or credentials; keep environment files on the server only
- Build assets (npm run build) locally or in CI โ shared hosting is not a build farm
- Deploy from a branch that always represents production, typically main
- Tag releases so rolling back is a checkout, not archaeology
Frequently Asked Questions
Does this work for WordPress?
Yes โ teams version themes and plugins in Git and deploy them this way, while uploads and the database stay on the server.
What if my host lacks Git or SSH?
That is a sign to move. Migration to a developer-friendly host is free at WebsNP and most quality providers.
Get a host that speaks Git: SSD shared hosting with SSH and Git, free cPanel migration, or ask our team anything.