{"id":18628,"date":"2025-02-04T08:56:57","date_gmt":"2025-02-04T08:56:57","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=18628"},"modified":"2025-02-04T08:56:58","modified_gmt":"2025-02-04T08:56:58","password":"","slug":"deploy-websites-with-git-on-cpanel-a-step-by-step-guide","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/","title":{"rendered":"Deploy Websites with Git on cPanel: A Step-by-Step Guide"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>This guide will walk you through the process of deploying a website using Git version control on cPanel. It is divided into three parts: preparing your code application, setting up Git version control in cPanel for public repositories, and configuring access to private repositories.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 1: Prepare Your Code Application<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li><strong>Create a\u00a0<code>.cpanel.yml<\/code>\u00a0File<\/strong><br>To enable deployment via cPanel, you need to create a\u00a0<code>.cpanel.yml<\/code>\u00a0file in the root directory of your application. This file defines the deployment tasks. Here&#8217;s how your folder structure will look: <\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"282\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png\" alt=\"\" class=\"wp-image-18629\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png 724w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15-300x117.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/figure>\n\n\n\n<p>2. <strong>Example\u00a0<code>.cpanel.yml<\/code>\u00a0File<\/strong><br>Below is an example of a\u00a0<code>.cpanel.yml<\/code>\u00a0file. Replace\u00a0<code>\/home\/cpanelusername\/public_html\/<\/code>\u00a0with the appropriate path for your deployment.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em><code>deployment:\n  tasks:\n    - export DEPLOYPATH=\/home\/cpanelusername\/public_html\/\n    - \/bin\/cp index.html $DEPLOYPATH\n    - \/bin\/cp about.html $DEPLOYPATH\n    - \/bin\/cp services.html $DEPLOYPATH\n    - \/bin\/cp contact.html $DEPLOYPATH\n    - \/bin\/cp styles.css $DEPLOYPATH\n    - \/bin\/cp script.js $DEPLOYPATH\n    - \/bin\/cp -r assets\/ $DEPLOYPATH<\/code><\/em><\/strong><\/code><\/pre>\n\n\n\n<p>If you&#8217;re deploying to a subdomain or addon domain, replace\u00a0<code>public_html<\/code>\u00a0with the appropriate directory name (e.g.,\u00a0<code>\/home\/cpanelusername\/sub.domain.com\/<\/code>).<\/p>\n\n\n\n<p>3. <strong>Push Changes to Your Repository<\/strong><br>Commit and push the\u00a0<code>.cpanel.yml<\/code>\u00a0file to your remote repository (GitHub or GitLab). If you\u2019ve already pushed changes, simply add the\u00a0<code>.cpanel.yml<\/code>\u00a0file and update the repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"465\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-16-1024x465.png\" alt=\"\" class=\"wp-image-18630\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-16-1024x465.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-16-300x136.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-16-768x349.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-16.png 1358w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\"><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 2: Set Up Git Version Control in cPanel (Public Repositories)<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li><strong>Log in to cPanel<\/strong><br>Access your cPanel account.<\/li>\n\n\n\n<li><strong>Navigate to Git Version Control<\/strong><br>In the cPanel dashboard, locate and click on the\u00a0<strong>Git Version Control<\/strong>\u00a0icon.<\/li>\n\n\n\n<li><strong>Create a Repository<\/strong>\n<ul class=\"wp-block-list\">\n<li>Click\u00a0<strong>Create<\/strong>\u00a0or\u00a0<strong>Clone a Repository<\/strong>.<\/li>\n\n\n\n<li>Enter the clone URL of your remote repository (GitHub or GitLab). Ensure the URL begins with\u00a0<code>http:\/\/<\/code>,\u00a0<code>https:\/\/<\/code>,\u00a0<code>ssh:\/\/<\/code>, or\u00a0<code>git:\/\/<\/code>.<\/li>\n\n\n\n<li>Specify the\u00a0<strong>Repository Path<\/strong>\u00a0where the repository will be stored. If the directory doesn\u2019t exist, cPanel will create it.<\/li>\n\n\n\n<li>Provide a\u00a0<strong>Repository Name<\/strong>\u00a0(this is for display purposes only).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"239\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-17-1024x239.png\" alt=\"\" class=\"wp-image-18631\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-17-1024x239.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-17-300x70.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-17-768x179.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-17.png 1110w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"405\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-18.png\" alt=\"\" class=\"wp-image-18632\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-18.png 961w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-18-300x126.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-18-768x324.png 768w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"491\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-19-1024x491.png\" alt=\"\" class=\"wp-image-18633\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-19-1024x491.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-19-300x144.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-19-768x368.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-19.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>4. <strong>Clone the Repository<\/strong><br>Click\u00a0<strong>Create<\/strong>\u00a0to clone the repository to your cPanel account.<\/p>\n\n\n\n<p>5. <strong>Deploy Changes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After pushing changes to your remote repository, return to cPanel.<\/li>\n\n\n\n<li>Go to\u00a0<strong>Git Version Control<\/strong>, select your repository, and click\u00a0<strong>Manage<\/strong>.<\/li>\n\n\n\n<li>On the\u00a0<strong>Pull or Deploy<\/strong>\u00a0tab, click\u00a0<strong>Update from Remote<\/strong>\u00a0and then\u00a0<strong>Deploy Head Commit<\/strong>.<\/li>\n\n\n\n<li>This will update your cPanel file manager with the latest code changes.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"301\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-20-1024x301.png\" alt=\"\" class=\"wp-image-18634\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-20-1024x301.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-20-300x88.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-20-768x226.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-20.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\"><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"500\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-21-1024x500.png\" alt=\"\" class=\"wp-image-18635\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-21-1024x500.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-21-300x146.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-21-768x375.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-21.png 1361w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>6<\/strong>. <strong>Verify Deployment<\/strong><br>Access your website to ensure the updates are reflected.<\/p>\n\n\n\n<p><strong>Note:<\/strong>\u00a0Do not delete the\u00a0<code>.git<\/code>\u00a0directory in your cPanel file manager, as this will break cPanel\u2019s ability to manage your repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"486\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-22-1024x486.png\" alt=\"\" class=\"wp-image-18636\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-22-1024x486.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-22-300x142.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-22-768x364.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-22.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\"><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 3: Set Up Access to Private Repositories<\/strong><\/h2>\n\n\n\n<p><strong>Generate an SSH Key<\/strong><br>Use cPanel Terminal Access to generate an SSH key:<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\"><\/ol>\n\n\n\n<p><code><em><strong>ssh-keygen -t rsa -f ~\/.ssh\/cpanel-private-repo -b 4096 -C \"username@mydomain.com\"<\/strong><\/em><\/code><\/p>\n\n\n\n<p><strong>Create an SSH Configuration File<\/strong><\/p>\n\n\n\n<p>Create the SSH configuration file:<\/p>\n\n\n\n<p><strong><em><code>touch ~\/.ssh\/config<\/code><\/em><\/strong><\/p>\n\n\n\n<p>Update the file permissions:<\/p>\n\n\n\n<p><strong><em><code>chmod 0600 ~\/.ssh\/config<br>chown username:username ~\/.ssh\/config<\/code><\/em><\/strong><\/p>\n\n\n\n<p>Open the\u00a0<code>~\/.ssh\/config<\/code>\u00a0file and add the following lines: Update where necessary. <\/p>\n\n\n\n<p><strong><em><code>Host *<br>IdentityFile ~\/.ssh\/cpanel-private-repo<\/code><\/em><\/strong><\/p>\n\n\n\n<p><strong>Register the SSH Key with the Private Repository Host<\/strong><br>Add the public key (<code>~\/.ssh\/cpanel-private-repo.pub<\/code>) to your GitHub or GitLab account under SSH keys.<\/p>\n\n\n\n<p><strong>Test the SSH Key<\/strong><br>Verify the SSH key works:<\/p>\n\n\n\n<p><em><strong><code>ssh -i ~\/.ssh\/cpanel-private-repo -T git@github.com<\/code><\/strong><\/em><\/p>\n\n\n\n<p>A success authentication message should appear. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"354\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-25-1024x354.png\" alt=\"\" class=\"wp-image-18639\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-25-1024x354.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-25-300x104.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-25-768x266.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-25.png 1323w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\"><\/ol>\n\n\n\n<p><strong>Clone the Private Repository<\/strong><br>Use the SSH URL to clone the repository:<\/p>\n\n\n\n<p><strong><em><code>git clone git@github.com:username\/cpanel-private-repo.git<\/code><\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Reference Guides<\/strong><\/h2>\n\n\n\n<p>For more information, please refer to the cPanel documentation below. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.cpanel.net\/cpanel\/files\/git-version-control\/\" target=\"_blank\" rel=\"noreferrer noopener\">cPanel Git Version Control Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.cpanel.net\/knowledge-base\/web-services\/guide-to-git-deployment\/\" target=\"_blank\" rel=\"noreferrer noopener\">Guide to Git Deployment<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.cpanel.net\/knowledge-base\/web-services\/guide-to-git-set-up-access-to-private-repositories\/\" target=\"_blank\" rel=\"noreferrer noopener\">Guide to Git Setup for Private Repositories<\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>By following this guide, you can efficiently deploy and manage your website using Git version control on cPanel, whether your repository is public or private.<\/p>\n\n\n\n<p>Happy Hosting!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide will walk you through the process of deploying a website using Git version control on cPanel. It is divided into three parts: preparing your code application, setting up Git version control in cPanel for public repositories, and configuring access to private repositories. Part 1: Prepare Your Code Application 2. Example\u00a0.cpanel.yml\u00a0FileBelow is an example [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1822,1878],"doc_tag":[],"class_list":["post-18628","docs","type-docs","status-publish","hentry","doc_category-cpanel","doc_category-get-all-your-cpanel-help"],"year_month":"2026-07","word_count":599,"total_views":"0","reactions":{"happy":"25","normal":"0","sad":"0"},"author_info":{"name":"Kibera","author_nicename":"dan-k","author_url":"https:\/\/truehost.com\/support\/author\/dan-k\/"},"doc_category_info":[{"term_name":"Cpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cpanel\/"},{"term_name":"Cpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/get-all-your-cpanel-help\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Deploy Websites with Git on cPanel: A Step-by-Step Guide -<\/title>\n<meta name=\"description\" content=\"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploy Websites with Git on cPanel: A Step-by-Step Guide -\" \/>\n<meta property=\"og:description\" content=\"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-04T08:56:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/\",\"name\":\"Deploy Websites with Git on cPanel: A Step-by-Step Guide -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/image-15.png\",\"datePublished\":\"2025-02-04T08:56:57+00:00\",\"dateModified\":\"2025-02-04T08:56:58+00:00\",\"description\":\"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/image-15.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/image-15.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploy Websites with Git on cPanel: A Step-by-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploy Websites with Git on cPanel: A Step-by-Step Guide -","description":"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/","og_locale":"en_US","og_type":"article","og_title":"Deploy Websites with Git on cPanel: A Step-by-Step Guide -","og_description":"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/","article_modified_time":"2025-02-04T08:56:58+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/","name":"Deploy Websites with Git on cPanel: A Step-by-Step Guide -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png","datePublished":"2025-02-04T08:56:57+00:00","dateModified":"2025-02-04T08:56:58+00:00","description":"Learn how to deploy websites using Git version control on cPanel. Includes setup for public and private repositories.","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/02\/image-15.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-websites-with-git-on-cpanel-a-step-by-step-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"Deploy Websites with Git on cPanel: A Step-by-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/18628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=18628"}],"version-history":[{"count":1,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/18628\/revisions"}],"predecessor-version":[{"id":18640,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/18628\/revisions\/18640"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=18628"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=18628"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=18628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}