Clone your Git repository in cPanel's Git Version Control, add a .cpanel.yml file, then click Update from Remote and Deploy HEAD Commit to publish.
1. Add a .cpanel.yml file to your repository
The deployment follows the instructions in a file called .cpanel.yml in the top folder of your repository. Without it, cPanel can pull your code but doesn't copy it to your website. A simple example that copies a static site to public_html:
---
deployment:
tasks:
- export DEPLOYPATH=/home2/USERNAME/public_html/
- /bin/cp -R *.html css images $DEPLOYPATH
- Replace
/home2/USERNAMEwith your home folder. cPanel shows it on the Create Repository page next to Repository Path, and in the File Manager. It may start with/homeor/home2. - List your own files and folders in the
cpline. To deploy into a subfolder, add it toDEPLOYPATH, for examplepublic_html/shop/. - Don't copy the
.gitfolder or files with passwords intopublic_html: everything there can be opened in a browser.
Commit the file and push it to your Git host.
2. Clone the repository in cPanel
Log in to cPanel, click Git™ Version Control in the Files section, then click Create.
Fill in the form:
- Leave Clone a Repository switched on.
- Clone URL: the https address of your repository, for example
https://github.com/yourname/your-site.git. On GitHub you find it under Code > HTTPS. - Repository Path: where cPanel keeps the repository. When you leave the URL field, cPanel fills in a path such as
repositories/your-site. Keep it outsidepublic_html, so the repository itself isn't public. - Repository Name: a display name. cPanel fills it in too.
- Click Create.

cPanel says The system successfully initiated the clone process and lists the repository. Large repositories can take a few minutes.
3. Deploy
In the repository list, click Manage next to your repository.

Deploy the latest version:
- Open the Pull or Deploy tab.
- Click Update from Remote to pull the newest commits from your Git host. HEAD Commit shows the commit you now have.
- Click Deploy HEAD Commit to run the tasks in
.cpanel.yml. - Last Deployment Information shows when and which commit was deployed last.

Every time you push new changes, come back here and click Update from Remote, then Deploy HEAD Commit. Pulling alone doesn't change your website.
Common problems
"Last Deployment Information" still says Not available
The deployment runs in the background. Wait a minute and reload the page. If it still shows nothing, click Deploy HEAD Commit once more. If that doesn't help either, check that .cpanel.yml is in the top folder of the repository and that its paths point to your own home folder.
The website doesn't change after deploying
Check that you clicked Update from Remote before deploying: HEAD Commit should show your newest commit message. Then check that the cp line in .cpanel.yml copies the files you changed. Clear your browser cache and any cache plugin.
The clone fails
Check the Clone URL: it must start with https:// and the repository must be public. For Repository Path, choose a folder that doesn't exist yet: cPanel creates it during the clone.
Removing a repository
Remove in the repository list only takes the repository off the list. cPanel doesn't delete the files: delete the folder in the File Manager afterwards if you no longer need it.
Related articles
- View the error log
- Upload files with the cPanel File Manager
- Manage files: edit, move, zip and set permissions
- Install Node.js on shared hosting without root
Still stuck? Open a support ticket and we'll help.