{"id":21897,"date":"2026-10-28T04:40:54","date_gmt":"2026-10-28T04:40:54","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=21897"},"modified":"2026-10-29T15:20:21","modified_gmt":"2026-10-29T15:20:21","slug":"how-to-deploy-a-website-with-the-hostinger-cli","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-deploy-a-website-with-the-hostinger-cli\/","title":{"rendered":"How to deploy a website with the Hostinger CLI"},"content":{"rendered":"<p>The Hostinger CLI deploys a Node.js app or a static HTML website to your Hostinger hosting plan with one command, <code>hostinger up<\/code>. The command asks which website and hosting plan to use, detects your app type and build settings, and links your project folder to the website so later deployments need no extra details. To save or remove a project&rsquo;s details yourself, use <code>hostinger link<\/code> and <code>hostinger unlink<\/code>.<\/p><h3><b>Before you start<\/b><\/h3><ul>\n<li>Install the Hostinger CLI and sign in, as described in <a data-click-id=\"hgr-post-content-link-how-to-use-hostinger-api-cli\" href=\"\/support\/11679133-how-to-use-hostinger-api-cli\/\">How to use Hostinger API CLI<\/a>.<\/li>\n<li>To deploy a Node.js app, use a hosting plan that supports Node.js web apps. See <a data-click-id=\"hgr-post-content-link-how-to-add-a-node-js-web-app-in-hostinger\" href=\"\/support\/how-to-deploy-a-nodejs-website-in-hostinger\/\">How to add a Node.js web app in Hostinger<\/a> for the supported plans and frameworks.<\/li>\n<\/ul><h2 id=\"h-deploy-a-website-with-hostinger-up\">Deploy a website with hostinger up<\/h2><p>Run <code>hostinger up<\/code> in your project folder to deploy a Node.js app or a static HTML website. The CLI asks a series of questions and runs the required commands in order, so you don&rsquo;t need to know which commands to run.<\/p><ol>\n<li>Open your project folder in the terminal and run <code>hostinger up<\/code>.<\/li>\n<li>Select the website to deploy to, or select <b>Create a new website<\/b>.<\/li>\n<li>For a new website, select the hosting plan to host it, then enter a domain. Leave the domain empty to use a free temporary subdomain on <code>hostingersite.com<\/code>.<\/li>\n<li>Confirm the detected app type. For a Node.js app, the CLI asks <b>This looks like a Node.js app. Deploy it as nodejs?<\/b> Type <code>Y<\/code> to continue.<\/li>\n<li>Review the build settings the CLI reads from your project, then type <code>Y<\/code> to use them. The settings include the framework, Node.js version, root directory, build script, output directory, entry file, and package manager.<\/li>\n<\/ol><p><img decoding=\"async\" class=\"alignnone size-full wp-image-21898\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-28_11-40.png\/public\" alt=\"\" width=\"733\" height=\"375\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-28_11-40.png\/w=733,fit=scale-down 733w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/10\/2026-10-28_11-40.png\/w=300,fit=scale-down 300w\" sizes=\"(max-width: 733px) 100vw, 733px\" \/><\/p><p>The CLI packs your project files, skipping files listed in <code>.gitignore<\/code>, then uploads and builds the website. When the build completes, the CLI shows the live URL of your website.<\/p><h2 id=\"h-redeploy-a-project-with-hostinger-up\">Redeploy a project with hostinger up<\/h2><p>After the first deployment, <code>hostinger up<\/code> links your project folder to the website. Run <code>hostinger up<\/code> again in the same folder to redeploy the website after you change your code. To deploy the folder to a different website instead, run <code>hostinger link<\/code>.<\/p><h2 id=\"h-save-project-details-with-hostinger-link\">Save project details with hostinger link and hostinger unlink<\/h2><p><code>hostinger link<\/code> saves your project&rsquo;s details locally, so later commands for that website need no account or domain details.<\/p><ol>\n<li>Open your project folder in the terminal.<\/li>\n<li>Run <code>hostinger link<\/code> to save the project details.<\/li>\n<li>Run <code>hostinger unlink<\/code> to remove the saved details.<\/li>\n<\/ol><p>After you link a project, website commands run without the hosting username and domain. For example, purging the CDN cache changes from this:<\/p><pre>hostinger hosting cdn purge-cache u123456789 domain.tld<\/pre><p>To this:<\/p><pre>hostinger hosting cdn purge-cache<\/pre><p>Your website is now deployed from your terminal, and later deployments and website commands need only the command name while you work in the linked project folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploy a Node.js app or static HTML site to Hostinger from your terminal with one command.<\/p>\n","protected":false},"author":594,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[295],"tags":[],"class_list":["post-21897","post","type-post","status-publish","format-standard","hentry","category-api"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21897","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\/594"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=21897"}],"version-history":[{"count":3,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21897\/revisions"}],"predecessor-version":[{"id":23899,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21897\/revisions\/23899"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=21897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=21897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=21897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}