{"id":140451,"date":"2026-10-26T09:19:19","date_gmt":"2026-10-26T09:19:19","guid":{"rendered":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-deploy-a-website-from-codex\/"},"modified":"2026-10-26T09:19:19","modified_gmt":"2026-10-26T09:19:19","slug":"how-to-deploy-a-website-from-codex","status":"publish","type":"post","link":"\/in\/tutorials\/how-to-deploy-a-website-from-codex\/","title":{"rendered":"How to deploy a website from Codex"},"content":{"rendered":"<p class=\"wp-block-paragraph\">To deploy a website from Codex, review the project, test it on your computer, and publish it on hosting that supports its framework and features.<\/p><p class=\"wp-block-paragraph\">The hosting setup you need depends on what Codex built. For example, a simple portfolio needs only its finished files published, while an app that handles user logins or stores information in a database needs hosting that runs server-side code, such as Node.js.<\/p><p class=\"wp-block-paragraph\">You can deploy your Codex website to Hostinger directly from your coding environment with Hostinger Connector, or through GitHub or a ZIP upload. Here&rsquo;s how:<\/p><ol class=\"wp-block-list\">\n<li>Review your Codex project.<\/li>\n\n\n\n<li>Identify the framework and test the site locally.<\/li>\n\n\n\n<li>Pick a deployment method.<\/li>\n\n\n\n<li>Check for necessary environment variables.<\/li>\n\n\n\n<li>Deploy your website.<\/li>\n\n\n\n<li>Connect your domain.<\/li>\n\n\n\n<li>Check that the live site works.<\/li>\n<\/ol><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-what-do-you-need-before-deploying-a-website-from-codex\">What do you need before deploying a website from Codex?<\/h2><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069a3248\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069a3248\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005214926-0.png\/public\" alt=\"Man thinking of how to deploy a website from Codex requirements\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Before deploying a website from Codex, prepare your project files and the tools you&rsquo;ll use to test and publish your website:<\/p><ul class=\"wp-block-list\">\n<li><strong>A Codex-built website. <\/strong>Have your project files saved on your computer or in a GitHub repository.<\/li>\n\n\n\n<li><strong>Visual Studio Code (VS Code).<\/strong> You&rsquo;ll use this free code editor to open your project and work with Codex. With Hostinger Connector, you can also<a data-click-id=\"hgr-post-content-link-in-tutorials-how-to-deploy-a-website-from-your-ide\" aria-label=\"How to deploy a website from your ide\" href=\"\/in\/tutorials\/how-to-deploy-a-website-from-your-ide\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-deploy-a-website-from-your-integrated-development-environmen\" href=\"\/in\/tutorials\/how-to-deploy-a-website-from-your-ide\/\" data-wpel-link=\"internal\" rel=\"follow\">deploy a website from your integrated development environment<\/a>.<\/li>\n\n\n\n<li><strong>Codex command-line interface (CLI).<\/strong> You&rsquo;ll use Codex through the VS Code terminal to review and prepare your project.<\/li>\n\n\n\n<li><strong>Node.js and npm.<\/strong> You&rsquo;ll use these to install packages and build your website if your project requires them. You&rsquo;ll check whether you need them in step 2.<\/li>\n\n\n\n<li><strong>A compatible hosting plan.<\/strong> You&rsquo;ll need hosting to make your website available online. For this tutorial, I used<a data-click-id=\"hgr-post-content-link-in-web-apps-hosting\" aria-label=\"Web apps hosting\" href=\"\/in\/web-apps-hosting\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-hostinger-web-apps-hosting\" href=\"\/in\/web-apps-hosting\" data-wpel-link=\"internal\" rel=\"follow\">Hostinger Web Apps Hosting<\/a>, which supports Vite projects through the Node.js web app option on the Unlimited and Cloud Startup plans. You can choose your hosting plan after reviewing your project&rsquo;s requirements.<\/li>\n<\/ul><p class=\"wp-block-paragraph\"><strong>Don&rsquo;t have a website yet? <\/strong>Create a simple portfolio to practice deployment. Open an empty folder in VS Code, select<strong> Terminal &rarr; New Terminal<\/strong>, and type <code>codex<\/code>. Once Codex opens, enter this prompt:<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Create a simple one-page portfolio website using Vite, with a navigation menu, an image, and a button. Keep it static, without a backend, database, or login system. Save the project files in the current folder.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">Once Codex finishes creating the project files, you&rsquo;re ready to review them.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-1-review-the-project-codex-generated\">1. Review the project Codex generated<\/h2><p class=\"wp-block-paragraph\">Review the project that Codex generated by opening it in VS Code and asking Codex to identify its framework, build command, output folder, and required settings.<\/p><p class=\"wp-block-paragraph\">This helps you understand which files to prepare and publish, so you don&rsquo;t upload the wrong files or miss something your website needs to work.<\/p><p class=\"wp-block-paragraph\">Follow these steps:<\/p><p class=\"wp-block-paragraph\">1. <strong>Open your project in VS Code.<\/strong> Select <strong>File &rarr; Open Folder<\/strong> and choose your website folder. You should see files such as <code>package.json<\/code>, <code>index.html<\/code>, or a <code>src<\/code> folder in the Explorer panel. For a GitHub project, use <strong>Source Control &rarr; Clone Repository<\/strong> to download and open it. This requires Git to be installed on your computer.<\/p><p class=\"wp-block-paragraph\">2. <strong>Start Codex.<\/strong> Select <strong>Terminal &rarr; New Terminal<\/strong>, type <code>codex<\/code>, and press Enter. Sign in with your ChatGPT account if prompted. You can skip this step if Codex is already running.<\/p><p class=\"wp-block-paragraph\">3. <strong>Ask Codex to review the project.<\/strong> Enter this prompt:<\/p><div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Review this project for deployment. Identify its framework, build command, start command, output folder, and any required environment variables. Explain what each means in simple language. Save the summary as deployment-notes.md in the current project folder.<br><br>Don&rsquo;t include passwords, API keys, or other secrets. Organize the summary under clear headings for the framework, build command, start command, output folder, and environment variables.<\/p>\n<\/blockquote>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div><p class=\"wp-block-paragraph\">4. <strong>Check the deployment summary.<\/strong> Open <code>deployment-notes.md<\/code> in VS Code&rsquo;s Explorer panel. It should explain how to build your website, where the finished files will be saved, and whether any additional settings are needed.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069a5d7f\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069a5d7f\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005228581-0.png\/public\" alt=\"Codex terminal opening deployment-notes.md\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-2-check-the-framework-and-test-the-website-locally\">2. Check the framework and test the website locally<\/h2><p class=\"wp-block-paragraph\">Check your website&rsquo;s framework in <code>deployment-notes.md<\/code>, then run and build the project in VS Code. This helps you catch broken features before deployment and create the finished website files you&rsquo;ll publish.<\/p><p class=\"wp-block-paragraph\">Open <code>deployment-notes.md<\/code> in VS Code and find the <strong>Framework \/ build tool<\/strong> entry.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069a6611\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069a6611\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005233847-0.png\/public\" alt=\"Framework \/ build tool entry in deployment-notes.md\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ul class=\"wp-block-list\">\n<li><strong>Does it mention Vite?<\/strong> Follow the instructions below.<\/li>\n\n\n\n<li><strong>Does it use something else? <\/strong>Ask Codex: &ldquo;Show me how to run, build, and test this website on my computer. Give me the commands in order and explain where to enter them.&rdquo;<\/li>\n<\/ul><p class=\"wp-block-paragraph\">In my case, Codex used Vite with plain HTML, CSS, and JavaScript. To follow along, open<strong> Terminal &rarr; New Terminal<\/strong> in VS Code, separate from your Codex session, and follow these steps:<\/p><ol class=\"wp-block-list\">\n<li><strong>Install the required packages.<\/strong> Run <code>npm install<\/code> and wait for it to finish. This downloads the packages your website needs to work.<\/li>\n\n\n\n<li><strong>Open your website locally.<\/strong> Run <code>npm run dev<\/code> and open the address shown in the terminal, such as <code>http:\/\/127.0.0.1:5173\/<\/code>. Keep the terminal running while testing.<\/li>\n\n\n\n<li><strong>Check that everything works.<\/strong> Test the navigation, links, images, and buttons. Look for placeholder text or content that needs replacing. Ask Codex to fix any issues you find, then check the changes in your browser.<\/li>\n\n\n\n<li><strong>Build the website.<\/strong> Return to the terminal running your local server and press <code>Ctrl + C<\/code> to stop it. Run <code>npm run build<\/code>. A successful build creates a <code>dist<\/code> folder containing the finished website files.<\/li>\n\n\n\n<li><strong>Check the finished files.<\/strong> In VS Code&rsquo;s Explorer panel, expand the <code>dist<\/code> folder. You should see <code>index.html<\/code> and an <code>assets<\/code> folder containing your website&rsquo;s CSS and JavaScript files.<\/li>\n\n\n\n<li><strong>Test the production version.<\/strong> Run <code>npm run preview<\/code> and open the address shown in the terminal. Check that your website still looks and works as expected. Press <code>Ctrl + C<\/code> to stop the preview when you&rsquo;re done.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Got a build error?                <\/p>\n            <\/div>\n            <p class=\"protip__content\"> Paste the error into Codex, ask it to fix the cause, and rerun the failed command. <\/p>\n                    <\/div>\n        <\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-3-choose-a-hosting-method-for-your-codex-project\">3. Choose a hosting method for your Codex project<\/h2><p class=\"wp-block-paragraph\">Choose how to deploy your Codex website based on where you want to publish it from and how you plan to handle future updates.<\/p><p class=\"wp-block-paragraph\">Here are three ways to deploy an existing Codex website to Hostinger Web Apps Hosting, which runs both static websites and Node.js apps with a backend:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Method<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>When to choose it<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>How updates work<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Hostinger Connector<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>You want to deploy directly from Codex in VS Code without switching between Codex, GitHub, and Hostinger dashboard<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Rebuild the website and ask Codex to publish the updated files<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>GitHub<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>You plan to update your website regularly and want those changes published automatically<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Push changes to the connected branch, and Hostinger automatically rebuilds and redeploys<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>ZIP upload<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>You prefer uploading files manually without connecting accounts<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Upload a new ZIP file and deploy again<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">Other cloud platforms, such as Vercel and Netlify, also support Codex-built projects. They make sense if you already host other projects there. You can<a data-click-id=\"hgr-post-content-link-in-tutorials-best-hosting-providers-for-web-apps\" aria-label=\"Best hosting providers for web apps\" href=\"\/in\/tutorials\/best-hosting-providers-for-web-apps\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-compare-web-app-hosting-providers\" href=\"\/in\/tutorials\/best-hosting-providers-for-web-apps\/\" data-wpel-link=\"internal\" rel=\"follow\">compare web app hosting providers<\/a> to explore other options.<\/p><figure class=\"wp-block-image size-full\"><a data-click-id=\"hgr-post-content-link-in-web-hosting\" href=\"\/in\/web-hosting\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/public\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-4-check-whether-your-website-needs-environment-variables\">4. Check whether your website needs environment variables<\/h2><p class=\"wp-block-paragraph\">Check whether your website needs environment variables by opening <code>deployment-notes.md<\/code> in VS Code and finding the <strong>Required<\/strong> <strong>environment variables<\/strong> entry.<\/p><p class=\"wp-block-paragraph\">These are settings stored outside your code, such as database addresses or API keys, that your website reads when it runs. Missing values break features like logins or database connections after deployment.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069aa143\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069aa143\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005239174-0.png\/public\" alt=\"Required environment variables entry in deployment-notes.md \"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Here&rsquo;s what to look for:<\/p><ul class=\"wp-block-list\">\n<li><strong>None or Not required.<\/strong> Your website doesn&rsquo;t need any environment variables configured, so you can move on to deployment.<\/li>\n\n\n\n<li><strong>Names such as <\/strong><code><strong>DATABASE_URL<\/strong><\/code><strong>, or no clear answer. <\/strong>Ask Codex to identify what your website needs and where to get each value. For example, <code>DATABASE_URL<\/code> contains connection information from your database provider. Use this prompt:<\/li>\n<\/ul><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Check whether this project needs any environment variables to work after deployment. List their names, explain where to get their values, and tell me where to configure them. Don&rsquo;t ask me to share passwords or secret keys.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\"><strong>Once you have the values, store and add them like this:<\/strong><\/p><ul class=\"wp-block-list\">\n<li>Keep sensitive values, such as <code>DATABASE_URL<\/code>, in a secure location, like a password manager. You&rsquo;ll enter them in your hosting settings during deployment.<\/li>\n\n\n\n<li>For the Vite example, add non-secret <code>VITE_<\/code> variables to a <code>.env.local<\/code> file before building your website locally and deploying it with Hostinger Connector. Enter these values in Hostinger&rsquo;s build settings instead if you&rsquo;re deploying through GitHub or a ZIP file.<\/li>\n\n\n\n<li>Variables starting with <code>VITE_<\/code> are visible in the finished website, so never use them for passwords or private API keys.<\/li>\n<\/ul><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-5-deploy-your-codex-website\">5. Deploy your Codex website<\/h2><p class=\"wp-block-paragraph\">Deploy your Codex website to Hostinger directly from VS Code using Hostinger Connector, or through Hostinger dashboard using a GitHub repository or ZIP file.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Deploy with Hostinger Connector<\/h3><p class=\"wp-block-paragraph\">To deploy with Hostinger Connector,<a data-click-id=\"hgr-post-content-link-in-connector\" aria-label=\"Connector\" href=\"\/in\/connector\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-connect-codex-to-hostinger\" href=\"\/in\/connector\" data-wpel-link=\"internal\" rel=\"follow\">connect Codex to Hostinger<\/a> in VS Code, then ask Codex to publish your website. This deploys your website directly from VS Code without manually uploading files through Hostinger dashboard.<\/p><p class=\"wp-block-paragraph\">1. <strong>Install Hostinger Connector.<\/strong> In VS Code, open <strong>Extensions<\/strong>, search for <strong>Hostinger Connector<\/strong>, and click <strong>Install<\/strong>.<\/p><p class=\"wp-block-paragraph\">2. <strong>Connect your account.<\/strong> Click the <strong>Hostinger<\/strong> icon in the sidebar, select <strong>1-Click Connect<\/strong>, and sign in. Return to VS Code, confirm the connected status, and make sure <strong>Websites<\/strong> is enabled.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069ab106\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069ab106\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005245167-0.png\/public\" alt=\"Installing Hostinger Connector on VS Code\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">3. <strong>Restart Codex.<\/strong> In the terminal, type <code>\/exit<\/code> to close Codex, then run codex to start a new session. Ask Codex to &ldquo;List my Hostinger websites&rdquo; to check the connection.<\/p><p class=\"wp-block-paragraph\">4. <strong>Deploy your website.<\/strong> Use a temporary domain so you can check your live website before connecting your own domain later. Paste this prompt into Codex:<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Deploy my Vite website to Hostinger as a new Node.js web app using the finished files in the <code>dist<\/code> folder. Don&rsquo;t rebuild the project. Use an unused temporary domain and don&rsquo;t replace any existing website. Show me the hosting account, plan, domain, and files for approval before deploying. Once finished, provide the live URL.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">5. <strong>Approve and check the deployment.<\/strong> In Codex, confirm the correct hosting account, plan, and temporary domain. Ask it to verify any required environment variables before approving. Once deployed, open the live URL to check that your homepage loads.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069abc8d\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069abc8d\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005250610-0.png\/public\" alt=\"Deployment success message on Codex\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">&#128073; <strong>Hit a snag during deployment?<\/strong><\/p><p class=\"wp-block-paragraph\">I did too! Codex returned an error while deploying my website because it had selected another Hostinger account I could access. I restarted it and used this prompt to check what went wrong:<\/p><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">My previous deployment failed with this error: [paste the error message from Codex]. <br><br>Check which hosting resources are available for my Hostinger plan and whether you can create a new website on it. Don&rsquo;t deploy anything yet. Explain what likely caused the error in simple terms and tell me whether it&rsquo;s safe to retry.<\/p>\n<\/blockquote><h3 class=\"wp-block-heading h-t-title-3\">Deploy with GitHub or a ZIP file<\/h3><p class=\"wp-block-paragraph\">You can also deploy your project through Hostinger dashboard without connecting Codex to your hosting account.<\/p><p class=\"wp-block-paragraph\">For GitHub deployment, make sure you have a GitHub account and Git installed on your computer.<\/p><ol class=\"wp-block-list\">\n<li><strong>Prepare your files.<\/strong> In VS Code&rsquo;s <strong>Source Control<\/strong> panel, commit and publish your project to GitHub, or compress the project files into a ZIP archive. For ZIP uploads, keep <code>package.json<\/code> at the top level and exclude <code>node_modules<\/code> and any <code>.env<\/code> files.<\/li>\n\n\n\n<li><strong>Open Hostinger dashboard.<\/strong> Go to <strong>Websites &rarr; Create site &rarr; Web App<\/strong>. In the chat window that opens, enter your preferred domain name or choose a temporary domain. Then select <strong>Import Git Repository<\/strong> to connect your GitHub account, or <strong>Upload your files<\/strong> to select your ZIP archive.<\/li>\n\n\n\n<li><strong>Review the settings and deploy.<\/strong> Check the detected build settings. For a Vite project, use <code>npm run build<\/code> as the build command and <code>dist<\/code> as the output directory. Add the values you prepared under <strong>Environment variables &rarr; Edit<\/strong> in the build settings if your website requires environment variables. Click <strong>Deploy<\/strong>, then open the live URL to confirm your website loads.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">&#9654;&#65039; <strong>Prefer a quick video?<\/strong> Check out our Codex tutorial for a quick look at how to publish a Codex-built app to Hostinger through GitHub:<\/p><figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Full Codex Tutorial for Beginners (2026) : How Build &amp; Deploy on Codex\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/7fnfKL7jMNQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure><p>\n  <div class=\"youtube-shortcode\">\n    <div class=\"row\">\n      <div class=\"col-7 col-sm-8 d-flex align-items-center\">\n        <img decoding=\"async\" class=\"channel-logo\" src=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/youtube-channels\/hostinger-academy.jpg\" alt=\"youtube channel logo\">\n        <div class=\"d-flex flex-column justify-content-between\">\n          <span class=\"slogan d-none d-sm-block\">Subscribe For more educational videos!<\/span>\n          <span class=\"channel-name\">Hostinger Academy<\/span>\n                    <\/div>\n      <\/div>\n      <div class=\"col-5 col-sm-4 d-flex align-items-center justify-content-end\">\n          <a data-click-id=\"hgr-post-content-link-subscribe\" class=\"subscribe-button\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" href=\"http:\/\/www.youtube.com\/channel\/UCbNIC-svDbtUOH2qsLnPQPg?sub_confirmation=1\">\n            <img decoding=\"async\" src=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/icons\/youtube.svg\" alt=\"subscribe\">\n            <span>Subscribe<\/span>\n          <\/a>\n      <\/div>\n    <\/div>\n  <\/div>\n\n    \n\n\n\n<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-6-connect-your-domain\">6. Connect your domain<\/h2><p class=\"wp-block-paragraph\">Connect a domain to your Codex website in Hostinger dashboard by opening <strong>Websites<\/strong>, finding your newly deployed site, and selecting the <strong>Connect domain<\/strong> icon.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6adf4069b7f7a\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069b7f7a\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/image-22.png\/public\" alt=\"Connect your domain icon in Websites on the Hostinger dashboard \" class=\"wp-image-160451\" style=\"aspect-ratio:3.9745222929936306;width:624px;height:auto\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Enter your domain name and confirm the change when prompted. Allow up to 24 hours for the domain to connect.<\/p><p class=\"wp-block-paragraph\">Don&rsquo;t have a domain yet? Keep using the temporary address and come back to this step later.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-7-test-the-live-website\">7. Test the live website<\/h2><p class=\"wp-block-paragraph\">Test your Codex website by opening its public URL and checking that everything works as expected. Even when your website works perfectly in VS Code, some errors only appear after deployment.<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069b8c17\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069b8c17\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005255073-0.png\/public\" alt=\"Hands typing on laptop visual, surrounded by table plant, coffee mug, and pen and paper.\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Check these before sharing the website with others:<\/p><ul class=\"wp-block-list\">\n<li><strong>Pages and links.<\/strong> Click through your website and check that every link works. For websites with multiple pages, try opening a page directly in a new tab, such as <strong>yourbrand.com\/about<\/strong>.<\/li>\n\n\n\n<li><strong>Images and layout.<\/strong> Check that images, fonts, and styles load correctly. Open the website on your phone to make sure nothing overlaps or gets cut off.<\/li>\n\n\n\n<li><strong>Buttons and forms.<\/strong> Test buttons, menus, and any forms. On my portfolio website, for example, I&rsquo;d check that the <strong>Explore my work<\/strong> button takes visitors to the right section.<\/li>\n\n\n\n<li><strong>HTTPS.<\/strong> Check that your website address starts with <strong>https:\/\/<\/strong>, including after connecting your domain.<\/li>\n<\/ul><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&#128073; <strong>Found something that doesn&rsquo;t work? <\/strong>Tell Codex which page you were on, what you tried, and what happened. For browser errors, right-click the page, select <strong>Inspect &rarr; Console<\/strong>, and copy the error message into Codex. Ask it to fix the error, then rebuild and redeploy your website. Test the same feature again to confirm it works.<\/p>\n<\/blockquote><p class=\"wp-block-paragraph\">Here&rsquo;s how my practice portfolio turned out after deploying it to Hostinger:<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069b9af1\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069b9af1\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005270688-0.png\/public\" alt=\"Sample portfolio site that the author used to test the steps\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">I didn&rsquo;t have a website when I started, so I asked Codex to build a simple portfolio to practice deploying. Not bad for a first attempt! <\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-fix-common-codex-deployment-problems\">How to fix common Codex deployment problems<\/h2><p class=\"wp-block-paragraph\">Fix Codex deployment problems by checking the error in Codex, Hostinger&rsquo;s build logs, or your browser, then applying the relevant fix from the table below.<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Problem<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>How to fix it<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Missing project files<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Check that your ZIP file or GitHub repository contains all the files your website needs. For Vite projects, make sure <strong>package.json<\/strong>&nbsp;is at the top level, not inside an extra folder.<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Packages won&rsquo;t install<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Check that your hosting&rsquo;s Node.js version matches the major version on your computer, such as 22.x. Run <strong>node -v<\/strong>&nbsp;in the VS Code terminal to check yours. Look for dependency errors, such as <strong>ERESOLVE<\/strong>, in the build logs or terminal. Ask Codex to identify and fix any package conflicts.<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Build fails<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>In your site&rsquo;s Hostinger dashboard, open <\/span><strong>Deployments<\/strong><span>, select the failed deployment, and view its <\/span><strong>Build logs<\/strong><span>. Copy the relevant error into Codex and ask it to fix the cause before redeploying.<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Website is blank or loads incorrectly<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Check that the output directory matches your project, such as <strong>dist<\/strong>&nbsp;for Vite. Right-click the page and select <\/span><strong>Inspect &rarr; Console<\/strong><span>&nbsp;to find errors and ask Codex to fix them.<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Features work locally but not online<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Check for missing environment variables or website addresses that still point to <strong>localhost<\/strong>&nbsp;instead of the live site. Correct the settings and redeploy.<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Hostinger Connector returns an error<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Check the error message in Codex. Ask it to verify your hosting account, plan, and website status before trying again.<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">Once you&rsquo;ve fixed the error, redeploy your website and test the affected page or feature to confirm it works.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-what-should-you-do-after-deploying-a-codex-website\">What should you do after deploying a Codex website?<\/h2><p class=\"wp-block-paragraph\">After deploying your Codex website, keep your hosting active, connect your domain, monitor your website, and keep improving it as your project grows .<\/p><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adf4069ba5b4\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adf4069ba5b4\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793005277647-0.png\/public\" alt=\"Developer celebrating after successfully deploying a Codex website illustration\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Start by checking the <a data-click-id=\"hgr-post-content-link-renewal-settings-for-your-hosting-plan-and-domain\" href=\"\/support\/3316237-how-to-automatically-renew-hostinger-services\/\" data-wpel-link=\"internal\" rel=\"follow\">renewal settings for your hosting plan and domain<\/a> in Hostinger dashboard. Turning on auto-renewal prevents your website from going offline because you forgot to renew either one. Connect your own domain once you&rsquo;re ready to replace the temporary address.<\/p><p class=\"wp-block-paragraph\">Check your live website regularly, especially after each update. Open the main pages, test key features like buttons and forms, and review the build logs in Hostinger dashboard if a deployment fails.<\/p><p class=\"wp-block-paragraph\">And just because your website is live doesn&rsquo;t mean you&rsquo;re done with Codex! Want to add another project to your portfolio or fix a button? Open the same project in VS Code and ask Codex to make the changes.<\/p><p class=\"wp-block-paragraph\">You can also explore other<a data-click-id=\"hgr-post-content-link-in-tutorials-codex-app-use-cases\" aria-label=\"Codex app use cases\" href=\"\/in\/tutorials\/codex-app-use-cases\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-codex-use-cases\" href=\"\/in\/tutorials\/codex-app-use-cases\/\" data-wpel-link=\"internal\" rel=\"follow\">Codex use cases<\/a> as you get more comfortable.<\/p><p class=\"wp-block-paragraph\">Before publishing your changes, test them locally, then update your live website using the same deployment method you followed earlier. Check the live site afterward to make sure everything works.<\/p><p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To deploy a website from Codex, review the project, test it on your computer, and publish it on hosting that supports its framework and features. The hosting setup you need depends on what Codex built. For example, a simple portfolio needs only its finished files published, while an app that handles user logins or stores [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/in\/tutorials\/how-to-deploy-a-website-from-codex\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":624,"featured_media":140452,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to deploy a website from Codex in 7 steps","rank_math_description":"Learn how to deploy a website from Codex: test it locally, publish with Hostinger Connector, GitHub, or ZIP, connect your domain, and fix common errors.","rank_math_focus_keyword":"how to deploy a website from codex","footnotes":""},"categories":[22661],"tags":[],"class_list":["post-140451","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-deploy-a-website-from-codex\/","default":1},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-deploy-a-website-from-codex\/","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/140451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/users\/624"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/comments?post=140451"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/140451\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media\/140452"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media?parent=140451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/categories?post=140451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/tags?post=140451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}