Git Version Control — Deploy straight from Git

Developer • cPanel Git

The cPanel tool that lets you connect a Git repository (GitHub, GitLab, Bitbucket or private) and automatically deploy the code to the server on every push — without FTP, without manual file uploads.

cPanel Git Version Control

Modern deployment straight from Git

Git Version Control is a cPanel feature that automates deployment — you connect your Git repository to the hosting and any push to the main branch automatically updates the files on the server. No FTP, no SFTP, no manual uploads.

Connect GitHub / GitLab / Bitbucket

Connect any public or private Git repository — GitHub, GitLab, Bitbucket or your own Git server. Authentication is done via SSH key or token.

Automatic deploy on push

Configure a webhook in GitHub/GitLab — on every git push to the main branch, cPanel automatically pulls the changes and applies them to the server in seconds.

Customizable deployment script

Configure a .cpanel.yml file in the repository that defines the commands run after pull — ideal for composer install, npm build, DB migrations or cache clearing.

Visible commit history

View the deployment history directly from cPanel — which commit was deployed, when and with what message. Manual rollback possible via SSH.

Terminal SSH — Deployment
$ git add .
$ git commit -m "feat: add product filter"
[main 3f4a8c2] feat: add product filter
3 files changed, 47 insertions(+), 12 deletions(-)
$ git push origin main
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Writing objects: 100% (5/5), done.
✓ Deployment triggered via webhook
✓ .cpanel.yml executed successfully
✓ Site updated — 3f4a8c2 live
Deployment history
feat: add product filter
3f4a8c2 · acum 2 minute
fix: checkout validation bug
a1b2c3d · acum 3 ore
chore: update dependencies
8e9f012 · ieri, 14:23
cPanel Git features

Everything you can do with Git in cPanel

A modern development and deployment workflow directly from the hosting control panel.

Connect a Git repository

Connect any remote Git repository — GitHub, GitLab, Bitbucket or self-hosted. Authentication via deploy key (SSH) or HTTPS token.

Automatic deploy via webhook

On every git push, the GitHub/GitLab webhook automatically triggers the pull on the server. The site is updated in seconds without manual intervention.

Deployment script .cpanel.yml

Define the commands run after each pull: composer install, npm ci, artisan migrate or cache clearing — customizable per repository.

Local repository on the server

You can create a Git repository directly on the server (bare repo) and push from your local machine via SSH. Useful for deployment without external Git hosting services.

Multiple branches

Configure deployment on any branch — main for production, develop for staging, feature branches for testing before merge.

Deployment history

View in cPanel which commits were deployed, when and by whom. Rollback to a previous version is possible via SSH with git checkout.

Deployment workflow

From local code to live site in 4 steps

Once configured, the deployment flow is completely automatic — you work locally, push and the site updates itself.

1

Initial setup

Connect the Git repository to cPanel just once — add the repo URL, the SSH key and configure the webhook in GitHub/GitLab.

2

Work locally

Develop new features on your local machine, test and commit as usual with git add, git commit.

3

git push → Automatic deploy

You run git push to the main branch. The webhook notifies the Trustnet Solutions server, which immediately pulls the changes and runs the deployment script.

4

Site updated live

Within seconds, the production site reflects all your changes. Zero FTP, zero manual upload, zero transfer errors.

Example .cpanel.yml file
---
deployment:
  tasks:
    - export DEPLOYPATH=/home/user/public_html/
    - cd $DEPLOYPATH
    - /usr/local/bin/composer install --no-dev --optimize-autoloader
    - /usr/local/bin/php artisan migrate --force
    - /usr/local/bin/php artisan config:cache
    - /usr/local/bin/php artisan view:clear
Frequently asked questions

About cPanel Git

Answers about version management and deployment on Trustnet Solutions hosting.

Included in all plans

Git Version Control is available on all Trustnet Solutions plans

GitHub, GitLab, Bitbucket

Compatible with any Git hosting platform or private repository

Yes, but with an important note: WordPress is not designed for classic Git deployment (wp-content/uploads must be excluded in .gitignore, databases are not versioned through Git). The best workflow is to version your custom theme and your own plugins through Git, and use WordPress Manager for backup and complete site restoration.

cPanel Git Version Control displays the errors from the deployment script in its interface. If a git pull or a command in .cpanel.yml fails, the process stops and you receive a notification. The site remains in its previous state — there is no partial deployment that could break production.

Yes — add the command to the .cpanel.yml file. Composer is available on Trustnet Solutions servers at the path /usr/local/bin/composer. On every deploy, composer install runs automatically and installs/updates the PHP dependencies from composer.json.

Yes, via SSH. You access the server via SSH, navigate to the site directory and run git checkout {commit-hash} or git revert to return to a previous version. cPanel Git does not offer one-click rollback from the interface, but the process via SSH is fast and safe.

Git Version Control included in cPanel

Available on all Trustnet Solutions plans. Connect your Git repository and deploy automatically on every push — without FTP, without manual upload.


Compatible with GitHub, GitLab, Bitbucket and any private Git server. SSH access included for advanced commands.