Using Git Version Control in cPanel

cPanel's Git Version Control feature lets you deploy your website directly from a Git repository — either a remote repository hosted on GitHub, GitLab, or Bitbucket, or a bare repository created on the server itself. When you push a commit, cPanel can automatically pull the changes and run a deployment script, replacing manual FTP uploads with a repeatable, version-tracked workflow.

Deploy your website from a Git repository.

How cPanel Git Deployment Works

  1. You create or clone a repository through cPanel.
  2. cPanel links the repository to a directory on your account (typically inside public_html).
  3. When you push to the repository (or manually trigger a pull), cPanel checks out the latest commit into the deployment path.
  4. An optional .cpanel.yml file in your repository defines post-checkout tasks such as running a build script or clearing a cache.

Cloning a Remote Repository

This is the most common workflow — your code lives on GitHub or a similar service and you deploy to CyclebreezeHost by pushing there.

  1. Log in to cPanel at clients.cyclebreezehost.com.
  2. Go to Files → Git Version Control.
  3. Click Create.
  4. Toggle Clone a Repository.
  5. In the Clone URL field, enter your repository URL — for example:
    https://github.com/yourname/your-repo.git
    
    For private repositories, use an HTTPS URL with a personal access token embedded or set up an SSH deploy key (see below).
  6. Set the Repository Path to the directory where cPanel will store the repository — for example:
    /home/yourusername/repositories/your-repo
    
  7. The Repository Name is auto-filled; adjust it if needed.
  8. Click Create. cPanel clones the repository.

Setting the Deployment Path

After cloning, configure where the checked-out files are served from.

  1. On the Git Version Control page, click Manage next to your repository.
  2. Under Deployment, verify or set the Document Root to your webroot — typically /home/yourusername/public_html or a subdirectory within it.
  3. If you are deploying a subdomain or addon domain, point this to that domain's document root.

Deploying Updates

Manual deployment

  1. In cPanel, go to Git Version Control → Manage for your repository.
  2. Click Pull or Deploy in the Deployment section.
  3. cPanel fetches the latest commits and checks out the repository HEAD.

Automatic deployment via webhook (recommended)

To deploy automatically every time you push to your remote:

  1. In your repository's Manage page, copy the Deployment URL shown under the webhook section.
  2. In GitHub: go to your repository Settings → Webhooks → Add webhook. Paste the URL, set the content type to application/json, and save.
  3. From now on, every push to the configured branch triggers an automatic pull on your CyclebreezeHost server.

Using .cpanel.yml for Post-Deploy Tasks

Create a .cpanel.yml file in the root of your repository to run commands after each deployment:

---
deployment:
  tasks:
    - export DEPLOYPATH=/home/yourusername/public_html/
    - /bin/cp -r $REPOSITORY/* $DEPLOYPATH
    - /usr/local/bin/php $DEPLOYPATH/artisan migrate --force
    - /usr/local/bin/php $DEPLOYPATH/artisan config:cache

Adjust paths and commands to match your application. The REPOSITORY variable points to the checked-out repository directory.

Using SSH Deploy Keys for Private Repositories

For private repos without embedding credentials in a URL:

  1. In cPanel, go to Security → SSH Access → Manage SSH Keys.
  2. Click Generate a New Key. Give it a name like github-deploy and generate without a passphrase (so deployments run unattended).
  3. Authorise the key on the same page.
  4. Copy the public key content.
  5. In GitHub: go to your repository Settings → Deploy keys → Add deploy key. Paste the public key, give it a title, and save.
  6. Use the SSH clone URL in cPanel's Git Version Control: git@github.com:yourname/your-repo.git.

Common Use Cases

ScenarioSetup note
Static HTML sitePoint deployment path to public_html; no .cpanel.yml needed
PHP application (Laravel)Use .cpanel.yml to run composer install and artisan commands
Theme-only deployPoint document root to the theme subfolder within your CMS installation
Multiple environmentsCreate separate cPanel repositories for staging and production branches

If you encounter clone errors or webhook delivery failures, verify your repository URL, credentials, and that the server's SSH key is added as a deploy key. Contact CyclebreezeHost support at info@cyclebreezehost.com for further assistance — the team is available 24/7.