{"id":1537,"date":"2019-02-08T10:35:56","date_gmt":"2019-02-08T10:35:56","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/1583302-how-to-deploy-a-git-repository-in-hostinger\/"},"modified":"2026-10-21T05:03:46","modified_gmt":"2026-10-21T05:03:46","slug":"1583302-how-to-deploy-a-git-repository-in-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger\/","title":{"rendered":"How to deploy a Git repository in Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Git is a Version Control System (VCS) used to track changes in files and coordinate work among developers. This integration allows you to seamlessly deploy PHP files, WordPress websites, and custom static projects from <a data-click-id=\"hgr-post-content-link-github\" href=\"https:\/\/www.hostinger.com\/tutorials\/what-is-github\/\">GitHub<\/a> or GitLab directly to your hosting plan.<\/p><h3 id=\"before-you-start\">Before you start<\/h3><ul>\n<li>Git integration is available for custom PHP and HTML websites hosted on <a data-click-id=\"hgr-post-content-link-web\" href=\"https:\/\/www.hostinger.com\/web-hosting\">web<\/a> and <a data-click-id=\"hgr-post-content-link-cloud\" href=\"https:\/\/www.hostinger.com\/cloud-hosting\">cloud<\/a> hosting plans.<\/li>\n<li>This does not apply for <a data-click-id=\"hgr-post-content-link-node-js-websites\" href=\"https:\/\/www.hostinger.com\/tutorials\/what-is-node-js\/\">Node.js websites<\/a>, instead please refer to the guide on <a data-click-id=\"hgr-post-content-link-deploying-node-js\" href=\"https:\/\/www.hostinger.com\/support\/how-to-deploy-a-nodejs-website-in-hostinger\/#Deploying-from-Github-Repository\">deploying Node.js<\/a> from a GitHub repository.<\/li>\n<li><a data-click-id=\"hgr-post-content-link-agency-hosting\" href=\"https:\/\/www.hostinger.com\/pro\">Agency Hosting<\/a> plans support a separate GitHub integration for existing websites.<\/li>\n<li><a data-click-id=\"hgr-post-content-link-hostinger-ai-builder\" href=\"https:\/\/www.hostinger.com\/ai-builder\">Hostinger AI Builder<\/a> websites do not support Git integration.<\/li>\n<\/ul><h2 id=\"deployment\">Set up Git deployment<\/h2><p>Git deployment on Hostinger dashboard supports both GitHub and GitLab through OAuth, allowing you to connect your Git provider account and deploy directly from your repositories &mdash; no SSH key setup required. You can deploy PHP files, WordPress websites, and similar projects using this integration.<\/p><p>You can start Git deployment two ways: from an existing website&rsquo;s dashboard, or directly from the <strong>Websites list<\/strong> when creating a new website via <strong>Import website &rarr; Deploy from GitHub<\/strong>, which opens the same GitHub (or GitLab) authorization screen described in step 4 below. This option is not available on Agency hosting plans.<\/p><p><img decoding=\"async\" class=\"alignnone size-full wp-image-19438\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-02_09-25.png\" alt=\"\" width=\"877\" height=\"327\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-02_09-25.png 877w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-02_09-25-300x112.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-02_09-25-768x286.png 768w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/p><p class=\"no-margin\">For the initial deployment of a Git repository:<\/p><ol>\n<li class=\"no-margin\">Go to Hostinger dashboard <span style=\"font-weight: 400\">&rarr; <\/span> <a data-click-id=\"hgr-post-content-link-websites\" class=\"intercom-content-link\" href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\">Websites<\/a>.<\/li>\n<li class=\"no-margin\"><b> <\/b>Locate the website and click on<b><a data-click-id=\"hgr-post-content-link-dashboard\" href=\"https:\/\/www.hostinger.com\/support\/6627955-how-to-use-the-hosting-dashboard-in-hostinger\/\"> Dashboard<\/a> <\/b>next to it.<\/li>\n<li class=\"no-margin\">On the sidebar, select <strong>Advanced<\/strong> <span style=\"font-weight: 400\">&rarr;<\/span> <b>Git.<br>\n<\/b><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/ef3dae90-8efa-4d9d-b987-c32b73723750.jpg\" alt=\"Hostinger panel showing the GIT menu item highlighted under Advanced after searching for git\" data-media-id=\"5347\"><\/li>\n<li class=\"no-margin\">Click <strong>Connect with GitHub<\/strong> or <strong>Connect with GitLab<\/strong>, depending on which Git provider hosts your repository, to connect your account via OAuth.<br>\n<img decoding=\"async\" class=\"alignnone wp-image-18081\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-300x135.png\" alt=\"\" width=\"538\" height=\"242\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-300x135.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-1024x460.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-768x345.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-1536x690.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/image-197-2048x920.png 2048w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/li>\n<li>Install and authorize the Hostinger extension on your GitHub account or specific repository when prompted by GitHub. If you&rsquo;re connecting GitLab instead, follow the authorization prompts shown by GitLab.<\/li>\n<li class=\"no-margin\">Once authorized, select the repository you want to deploy from the list and click <strong>Next<\/strong>.<\/li>\n<li class=\"no-margin\"><span data-path-to-node=\"12,5,0,1\"><span class=\"citation-243\">Confirm your deployment settings<\/span><\/span><span data-path-to-node=\"12,5,0,3\">:<\/span>\n<ol>\n<li class=\"no-margin\"><strong>Repository<\/strong>: Pre-filled based on your selection.<img decoding=\"async\" class=\"alignnone size-full wp-image-10623\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-16_2.png\" alt=\"\" width=\"582\" height=\"522\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-16_2.png 582w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-16_2-300x269.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/li>\n<li class=\"no-margin\"><strong>Branch<\/strong>: Select the branch you want to deploy (defaults to <code>main<\/code>).<\/li>\n<li class=\"no-margin\"><strong>Root directory<\/strong>: The folder where your repository files will be deployed. Defaults to <code>public_html<\/code>. <b>You can change this<\/b> to any valid directory on your hosting account (e.g., <code>public_html\/my-project)<\/code><\/li>\n<li class=\"no-margin\">Click <strong>Deploy<\/strong>.<img decoding=\"async\" class=\"alignnone size-full wp-image-10624\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17.png\" alt=\"\" width=\"649\" height=\"636\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17.png 649w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17-300x294.png 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/li>\n<li class=\"no-margin\">An automated confirmation message appears when the deployment is complete. Click <strong>Go to dashboard<\/strong> to return to your Git management screen.<\/li>\n<\/ol>\n<\/li>\n<\/ol><div>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10625\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17_1.png\" alt=\"\" width=\"542\" height=\"410\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17_1.png 542w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-17_1-300x227.png 300w\" sizes=\"(max-width: 542px) 100vw, 542px\" \/><\/p>\n<h2 id=\"management\">Manage your deployed Git repository<\/h2>\n<p>From your Git overview section, you can monitor and control your active repository settings:<\/p>\n<ul>\n<li><strong>View repository details<\/strong>: Check your active connected repository and Git provider account credentials.<\/li>\n<li><strong>Auto-deployment status<\/strong>: Click the <strong>Auto-deployment<\/strong> dropdown next to your connected repository to turn off automatic deployments, which stops new deployments from triggering when updates merge into your deployment branch. Turn automatic deployments back on using the same dropdown.<br>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-19110\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-11.png\" alt=\"\" width=\"736\" height=\"267\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-11.png 736w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-11-300x109.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/li>\n<li><strong>Manual deployment<\/strong>: Click <strong>Redeploy<\/strong> to manually fetch and apply the latest changes from your repository.<\/li>\n<li><strong>Deployment history<\/strong>: Access the <strong>All deployments<\/strong> to review previous deployment details, including the branch name, commit ID, timestamp, and status.<br>\n<img decoding=\"async\" class=\"alignnone wp-image-10627 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-19-e1790560974132.png\" alt=\"\" width=\"642\" height=\"284\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-19-e1790560974132.png 642w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-15_11-19-e1790560974132-300x133.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/li>\n<li><strong>Disconnect repository<\/strong>: Click the options button &#8942; &rarr; <strong>Disconnect from repository<\/strong> if you need to unlink your project. Your website files will reflect the deployed state of your chosen repository branch.<\/li>\n<li><strong>Disconnect Git provider<\/strong>: Click the options button &#8942; &rarr; <strong>Disconnect GitHub<\/strong> or <strong>Disconnect GitLab<\/strong>, depending on which provider is connected, if you want to unlink your entire account from Hostinger, rather than just the current repository connection.<br>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-19111\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-14.png\" alt=\"\" width=\"1191\" height=\"373\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-14.png 1191w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-14-300x94.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-14-1024x321.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/09\/2026-09-28_09-14-768x241.png 768w\" sizes=\"(max-width: 1191px) 100vw, 1191px\" \/><\/li>\n<\/ul>\n<p><strong>NOTE<\/strong><\/p>\n<ul>\n<li>Disconnecting or changing your deployment repository will cause newly deployed files to overwrite existing data in your target directory.<\/li>\n<\/ul>\n<h2 id=\"h-github-integration-for-agency-hosting-websites\">GitHub integration for Agency Hosting websites<\/h2>\n<p><a data-click-id=\"hgr-post-content-link-agency-hosting-2\" href=\"https:\/\/www.hostinger.com\/pro\">Agency Hosting<\/a> plans support GitHub integration for existing WordPress, PHP, and HTML websites. This integration does not support GitLab or Node.js full-stack applications.<\/p>\n<p>To connect a repository, follow the same steps as in <a data-click-id=\"hgr-post-content-link-set-up-git-deployment\" href=\"https:\/\/www.hostinger.com\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger\/#deployment\">Set up Git deployment<\/a>. Use the integration to pause or resume automatic deployments, review completed deployments, and manually redeploy a website.<\/p>\n<\/div><p>With Git integration set up, your website updates automatically whenever you push changes to your connected repository, or on demand with a manual redeploy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect GitHub or GitLab to deploy PHP and HTML websites automatically on every push.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[264],"tags":[],"class_list":["post-1537","post","type-post","status-publish","format-standard","hentry","category-advanced-hpanel"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/1583302-como-implementar-un-repositorio-git-en-hostinger","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583302-comment-deployer-un-depot-git-hostinger","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/1583302-bagaimana-cara-deploy-repositori-git-di-hostinger","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/1583302-como-implantar-fazer-o-deploy-de-um-repositorio-git-hostinger","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/1583302-\u044f\u043a-\u0440\u043e\u0437\u0433\u043e\u0440\u043d\u0443\u0442\u0438-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u0439-git-\u043d\u0430-hostinger","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1537"}],"version-history":[{"count":18,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537\/revisions"}],"predecessor-version":[{"id":10620,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537\/revisions\/10620"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}