cPanel's Git™ Version Control lets you keep your website in a Git repository on your hosting account, so deploying becomes "pull the latest commit" rather than dragging files over FTP and hoping you caught them all. This guide covers what the tool can and cannot do on Fast Hive shared hosting, how to set up a repository, and how to deploy from it.
"Your system administrator must enable shell access to allow you to view clone URLs."
Shell access is not enabled on shared accounts, which means you cannot clone the repository from your own machine and push directly to it. The workflow below therefore pulls from a remote host such as GitHub or GitLab, rather than treating your hosting account as the Git remote. Plan around that before you start.
What you can and cannot do
| Task | On shared hosting |
|---|---|
| Clone a public repository onto the account | Yes |
| Pull the latest changes from the cPanel interface | Yes |
Deploy automatically on pull, via .cpanel.yml | Yes |
| Track an existing folder as a repository | Yes |
| Push from your laptop straight to the server | No - needs shell access |
| Clone a private repository | Needs preconfigured access - open a ticket |
Run composer install or a build step | Not from the panel - commit built assets instead |
The recommended workflow
- Keep your site in a repository on GitHub, GitLab or Bitbucket.
- Clone it onto your hosting account once, using Git Version Control.
- Work locally and push to that remote as normal.
- When you want the changes live, open cPanel and click Pull.
- A
.cpanel.ymlfile in the repository copies the files into place automatically.
Creating the repository
- Log in to cPanel from My Products & Services.
- Under Files, open Git™ Version Control.
- Click Create.
- To pull from an existing remote, enable Clone a Repository and enter the Clone URL. It must begin with
http://,https://,ssh://orgit://, or with a username and domain. - Set the Repository Path, relative to your home directory. Use a folder outside
public_html, such asrepositories/mysite. - Give it a Repository Name - a display label only.
- Click Create.
public_html. The repository contains a .git directory holding your entire commit history - including anything you ever committed and later removed, such as a password or an API key. Served from the web root, that history can be downloaded by anyone who knows to look. Clone outside the web root and deploy into it.
The path field also rejects ./ and ../, whitespace, and the characters \ * | " ' < > & @ ` $ { } [ ] ( ) ; ? : = % #. Keep paths simple and lowercase.
Automating deployment with .cpanel.yml
Cloning puts the files in your repository folder, not on your website. A .cpanel.yml file in the root of the repository tells cPanel what to copy where when you deploy.
---
deployment:
tasks:
- export DEPLOYPATH=/home/username/public_html/
- /bin/cp -R public/* $DEPLOYPATH
- /bin/cp .htaccess $DEPLOYPATH
Replace username with your cPanel username, shown on the cPanel home screen. Commit the file, push it to your remote, then in Git Version Control use Manage → Pull or Deploy.
.cpanel.yml.
What not to commit
Add a .gitignore before your first commit:
# Credentials and environment
.env
wp-config.php
config/database.php
# Dependencies
/vendor/
/node_modules/
# User content
/wp-content/uploads/
# Local noise
.DS_Store
*.log
Two rules worth stating plainly. Credentials never belong in a repository - and if one is committed by accident, removing it in a later commit does not remove it from the history; treat it as exposed and rotate it. And user uploads should not be version controlled: they are created on the live site, so a deployment that overwrites them destroys customer data.
Deploying
- Push your changes to GitHub, GitLab or Bitbucket as usual.
- In cPanel, open Git™ Version Control.
- Click Manage beside the repository.
- Open the Pull or Deploy tab.
- Click Update from Remote to fetch the latest commits.
- Click Deploy HEAD Commit to run the tasks in
.cpanel.yml.
The deployment log on the same page shows what ran and whether it succeeded.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| "Your system administrator must enable shell access" | Expected on shared hosting. Clone URLs are hidden, so you cannot push to the account. Use the pull-from-remote workflow above, or ask Sales & Solutions about a VPS if you need push-to-deploy. |
| Clone fails on a private repository | Private repositories need access preconfigured on the server. Open a ticket with Technical Support, or make the repository public if it contains nothing sensitive. |
| Deploy reports success but the site is unchanged | The paths in .cpanel.yml are wrong, or DEPLOYPATH points somewhere unexpected. Check it against your real home directory path. |
| Deploy button does nothing | No .cpanel.yml in the repository root, or the YAML is invalid. Validate the indentation. |
| Pull fails with a merge conflict | Files were edited on the server as well as in the repository. Decide which side wins, resolve it in your remote, and pull again. Pick one place to make changes. |
| Uploaded images disappeared after a deploy | The uploads directory is being overwritten by the deployment. Exclude it in .gitignore and do not copy it in .cpanel.yml. Restore from a backup. |
| Site broke after deploying | Missing dependencies - vendor/ or built assets are gitignored but never installed on the server. Commit the built output, since you cannot run a build step here. |
| Repository is consuming a lot of disk | Large binaries in the history. Git keeps every version forever. Keep media out of the repository. |
Frequently asked questions
Do I need Git to use Fast Hive hosting?
Not at all. File Manager and SFTP are perfectly good. Git earns its place when several people work on the same site, or when you want a reliable way to undo a bad deployment.
Can I push straight to my hosting account?
Not on shared hosting, because shell access is not enabled. Push to GitHub or GitLab and pull from cPanel instead. A VPS with root access supports the full push-to-deploy workflow.
Is Git a backup?
It backs up your code. It does not back up your database or user uploads, which is where most of a live site's real content lives. Keep taking proper backups.
Can I deploy automatically when I push?
Not without shell access - the deploy step is a manual click in cPanel. On a VPS you can wire up a webhook.
Which branch gets deployed?
The one currently checked out in the repository. Check it in the Manage view before deploying, and keep production on a dedicated branch rather than whatever you were last working on.
Can I use Git for a WordPress site?
Yes, but version the theme and custom plugins only. Committing all of WordPress plus every plugin makes updates conflict, and you must exclude wp-config.php and the uploads directory.
