{"id":25444,"date":"2026-11-17T06:51:40","date_gmt":"2026-11-17T06:51:40","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=25444"},"modified":"2026-11-23T04:02:48","modified_gmt":"2026-11-23T04:02:48","slug":"how-to-share-a-local-website-with-hostinger-preview","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-share-a-local-website-with-hostinger-preview\/","title":{"rendered":"How to share a local website with Hostinger Preview"},"content":{"rendered":"<p>Hostinger Preview shares a website from your localhost environment on a temporary Hostinger domain that stays live for 24 hours. To share your project, run the <code>hostinger preview<\/code> command in the Hostinger CLI and send the generated URL to anyone who needs to view it. To publish the project permanently, run <code>hostinger up<\/code> to deploy it to a new or existing Hostinger hosting plan.<\/p><h3><strong>Before you start<\/strong><\/h3><p>Make sure the Hostinger CLI is installed and set up on your computer, as described in <a data-click-id=\"hgr-post-content-link-how-to-use-hostinger-api-cli\" href=\"https:\/\/www.hostinger.com\/support\/11679133-how-to-use-hostinger-api-cli\/\">How to use Hostinger API CLI<\/a>. Make sure your website project runs in your local environment.<\/p><h2 id=\"h-share-a-local-website-with-hostinger-preview\">Share a local website with Hostinger Preview<\/h2><p>The <code>hostinger preview<\/code> command publishes your local project on a Hostinger temporary domain. The site stays live for 24 hours after you run the command.<\/p><ol>\n<li>Open the terminal in your project&rsquo;s local environment.<\/li>\n<li>Run the following command:<br>\n<code>hostinger preview<\/code><\/li>\n<li>Copy the temporary domain URL that the CLI generates.<\/li>\n<li>Send the URL to the people you want to review the project.<\/li>\n<\/ol><h2 id=\"h-how-long-hostinger-preview-stays-live\">How long Hostinger Preview stays live<\/h2><p>A Hostinger Preview site stays live for 24 hours after you use the <code>hostinger preview<\/code> command. To share the project again after that, run the command again.<\/p><h2 id=\"h-view-a-website-shared-with-hostinger-preview\">View a website shared with Hostinger Preview<\/h2><p>Anyone with the Hostinger Preview URL can open the temporary site in a browser. A message informs visitors that they are viewing a temporary site that is available for 24 hours.<\/p><h2 id=\"h-deploy-a-hostinger-preview-project-to-your-hosting-plan\">Deploy a Hostinger Preview project to your hosting plan<\/h2><p>The <code>hostinger up<\/code> command deploys your local project directly to a new or existing Hostinger hosting plan. Use it once the project is ready to go live permanently. For build settings, redeployments, and linking a project folder, see <a data-click-id=\"hgr-post-content-link-how-to-deploy-a-website-with-the-hostinger-cli\" href=\"https:\/\/www.hostinger.com\/support\/how-to-deploy-a-website-with-the-hostinger-cli\/\">How to deploy a website with the Hostinger CLI<\/a>.<\/p><ol>\n<li>Open the terminal in your project&rsquo;s local environment.<\/li>\n<li>Run the following command:<br>\n<code>hostinger up<\/code><\/li>\n<li>Select a new or existing hosting plan to deploy the project to.<\/li>\n<\/ol><p>Your project is now live on your hosting plan instead of a temporary domain.<\/p><p><img decoding=\"async\" class=\"alignnone wp-image-25445\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-17_13-50-300x184.png\" alt=\"\" width=\"587\" height=\"360\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-17_13-50-300x184.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-17_13-50-1024x626.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-17_13-50-768x470.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-17_13-50.png 1360w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/p><p>You can now share your local project for review with Hostinger Preview and publish it to your hosting plan when it&rsquo;s approved.<\/p><p><strong>NOTES<\/strong><\/p><ul>\n<li>Hostinger Preview is separate from the preview features in Hostinger Website Builder and WordPress. It works with projects that run in your local environment.<\/li>\n<li>To preview changes from a GitHub pull request on a deployed Node.js website instead, see <a data-click-id=\"hgr-post-content-link-how-to-use-pull-request-previews-for-node-js-websites-in-hos\" href=\"https:\/\/www.hostinger.com\/support\/how-to-use-pull-request-previews-for-node-js-websites-in-hostinger\/\">How to use pull request previews for Node.js websites in Hostinger<\/a>.<\/li>\n<li>A Hostinger Preview site is temporary and removed after 24 hours, so use <code>hostinger up<\/code> to keep the project online.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Share a local website with Hostinger Preview on a temporary URL that stays live for 24 hours, then deploy it to your hosting plan with the Hostinger CLI.<\/p>\n","protected":false},"author":597,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[274,155],"tags":[],"class_list":["post-25444","post","type-post","status-publish","format-standard","hentry","category-website-development","category-website"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/25444","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\/597"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=25444"}],"version-history":[{"count":5,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/25444\/revisions"}],"predecessor-version":[{"id":25588,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/25444\/revisions\/25588"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=25444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=25444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=25444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}