{"id":131067,"date":"2025-11-07T15:27:47","date_gmt":"2025-11-07T20:27:47","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=131067"},"modified":"2025-11-12T18:09:42","modified_gmt":"2025-11-12T23:09:42","slug":"deploy-ai-generated-websites-to-server","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/","title":{"rendered":"How to Deploy Websites Generated by AI Builders on Your Server"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders-1024x538.png\" class=\"optimized-lcp-image\" alt=\"How to Deploy Websites Generated by AI Builders on Your Server\" loading=\"eager\" fetchpriority=\"high\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png 1200w\"><\/figure>\n\n\n\n<p>AI website builders can spit out functional sites in minutes. Tools like Wix AI, TeleportHQ, and Framer generate clean HTML, CSS, and JavaScript based on simple prompts. But here\u2019s the catch: most of these platforms want to lock you into their hosting ecosystem. You pay monthly, you follow their rules, and you\u2019re stuck with whatever performance they give you.<\/p>\n\n\n\n<p>If you\u2019re running a <a href=\"\/vps-hosting\">VPS<\/a> or <a href=\"\/dedicated-servers\">dedicated server<\/a> with InMotion Hosting, you already have more control and better performance than any shared platform can offer. This guide shows you exactly how to take code from AI website builders and deploy it to your own infrastructure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding What AI Website Builders Export<\/h2>\n\n\n\n<p>Before you deploy anything, you need to understand what different AI website builders actually export. Not all platforms give you the same output, and that affects your deployment strategy.<\/p>\n\n\n\n<p>Most AI website builders fall into three categories:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Static HTML\/CSS\/JavaScript generators<\/strong> like TeleportHQ and Relume export clean, production-ready code. These tools give you standard web files you can drop onto any server. No frameworks, no build process\u2014just HTML, CSS, and vanilla JavaScript. This is the easiest type to deploy.<\/li>\n\n\n\n<li><strong>Framework-based generators<\/strong> like Framer output React components or other modern framework code. These require a build step before deployment. You\u2019ll need Node.js to compile the code into static files or run it as a web application.<\/li>\n\n\n\n<li><strong>Platform-locked builders<\/strong> like Wix and Squarespace keep your code on their servers. These won\u2019t work for this guide because you can\u2019t export the underlying files. If you\u2019re using one of these, you\u2019ll need to switch to an exportable alternative.<\/li>\n<\/ol>\n\n\n\n<p>For this guide, we\u2019re focusing on exportable code\u2014whether static or framework-based. Both types work on your VPS or dedicated server, but the deployment process differs slightly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exporting Code from AI Website Builders<\/h2>\n\n\n\n<p>Getting your code out of the AI builder is usually straightforward, but each platform handles it differently.<\/p>\n\n\n\n<p><strong>TeleportHQ<\/strong> offers direct code export. After generating your site, click the export button and download a ZIP file containing all your HTML, CSS, JavaScript, and assets. The structure is production-ready with organized directories for images, styles, and scripts.<\/p>\n\n\n\n<p><strong>Framer<\/strong> requires publishing first, then you can export the code. The exported files include React components and a Next.js configuration. You\u2019ll need to run <code>npm install<\/code> and <code>npm run build<\/code> to create the static output.<\/p>\n\n\n\n<p><strong>Relume<\/strong> focuses on design handoff. Export your wireframes and style guides to Figma or Webflow, then convert those to production code. If you\u2019re using Webflow, you can export the final HTML\/CSS\/JavaScript from there.<\/p>\n\n\n\n<p>Once you have your files locally, inspect the structure. Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An <code>index.html<\/code> file (your homepage)<\/li>\n\n\n\n<li>CSS files in a <code>\/css<\/code> or <code>\/styles<\/code> directory<\/li>\n\n\n\n<li>JavaScript files in a <code>\/js<\/code> or <code>\/scripts<\/code> directory<\/li>\n\n\n\n<li>Images in an <code>\/images<\/code> or <code>\/assets<\/code> directory<\/li>\n<\/ul>\n\n\n\n<p>If you see a <code>package.json<\/code> file, you\u2019re working with a framework-based site that needs building before deployment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up Your VPS or Dedicated Server<\/h2>\n\n\n\n<p>Your InMotion Hosting VPS or Dedicated Server needs proper configuration before hosting any website. We\u2019ll use Ubuntu 24.04 as the base operating system and <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/nginx\/advanced-nginx-vps-and-dedicated\/\">nginx as the web server<\/a>. nginx outperforms Apache for static content delivery, and it\u2019s the standard for modern web hosting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing nginx<\/h3>\n\n\n\n<p>Connect to your server via SSH using your InMotion Hosting credentials:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ssh root@your-server-ip<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">root@your-server-ip<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Update your package lists and install nginx:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt update\napt install nginx -y<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">update<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Start nginx and enable it to run on boot:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>systemctl start nginx\nsystemctl enable nginx<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">start<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Test the installation by visiting your server\u2019s IP address in a browser. You should see the default nginx welcome page. This confirms nginx is running and accessible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring the Firewall<\/h3>\n\n\n\n<p>Your server needs firewall rules to allow HTTP and HTTPS traffic while blocking everything else. Install and configure UFW (Uncomplicated Firewall):<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt install ufw -y\nufw allow 22\/tcp    # SSH access\nufw allow 80\/tcp    # HTTP traffic\nufw allow 443\/tcp   # HTTPS traffic\nufw enable<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">allow<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">22<\/span><span style=\"color: #9ECBFF\">\/tcp<\/span><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\"># SSH access<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">allow<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">80<\/span><span style=\"color: #9ECBFF\">\/tcp<\/span><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\"># HTTP traffic<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">allow<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">443<\/span><span style=\"color: #9ECBFF\">\/tcp<\/span><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #6A737D\"># HTTPS traffic<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Verify your firewall rules:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ufw status verbose<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ufw<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">status<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">verbose<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>You should see your three allowed ports listed. Never skip the SSH port (22) or you\u2019ll lock yourself out of your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a Deployment User<\/h3>\n\n\n\n<p>Running everything as root is bad practice. Create a dedicated user for deployments:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>adduser deploy\nusermod -aG sudo deploy\nusermod -aG www-data deploy<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">adduser<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">usermod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-aG<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">usermod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-aG<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">www-data<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This creates a user named \u201cdeploy\u201d with sudo privileges and adds them to the www-data group, which nginx uses for file access.<\/p>\n\n\n\n<p>Set up SSH key authentication for this user. On your local machine, generate an SSH key if you don\u2019t have one:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ssh-keygen -t ed25519 -C \"deployment@yourdomain.com\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh-keygen<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-t<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ed25519<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-C<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"deployment@yourdomain.com\"<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Copy the public key to your server:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ssh-copy-id deploy@your-server-ip<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh-copy-id<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy@your-server-ip<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Test the connection:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ssh deploy@your-server-ip<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy@your-server-ip<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>If you connect without entering a password, your SSH keys are configured correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deploying Static Websites from AI Builders<\/h2>\n\n\n\n<p>Static sites are the simplest to deploy. They\u2019re just files\u2014no database, no application server, no complications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the Web Directory<\/h3>\n\n\n\n<p>Create a directory for your website. Use a structure that allows multiple sites on one server:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo mkdir -p \/var\/www\/yourdomain.com\nsudo chown -R deploy:www-data \/var\/www\/yourdomain.com\nsudo chmod -R 755 \/var\/www\/yourdomain.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">mkdir<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-p<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chown<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-R<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy:www-data<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chmod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-R<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">755<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This creates a directory owned by your deploy user but readable by nginx (which runs as www-data). The permissions (755) mean the owner can read\/write\/execute, while the group and others can only read\/execute.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Uploading Your Files<\/h3>\n\n\n\n<p>Use rsync to transfer your exported website files to the server. From your local machine:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>rsync -avz --delete \/path\/to\/local\/website\/ deploy@your-server-ip:\/var\/www\/yourdomain.com\/<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">rsync<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-avz<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--delete<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/path\/to\/local\/website\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy@your-server-ip:\/var\/www\/yourdomain.com\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The flags mean:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-a<\/code>: Archive mode (preserves permissions and timestamps)<\/li>\n\n\n\n<li><code>-v<\/code>: Verbose output so you see what\u2019s happening<\/li>\n\n\n\n<li><code>-z<\/code>: Compress during transfer to save bandwidth<\/li>\n\n\n\n<li><code>--delete<\/code>: Remove files on the server that don\u2019t exist locally<\/li>\n<\/ul>\n\n\n\n<p>The trailing slash on the source path (<code>\/path\/to\/local\/website\/<\/code>) is important. It copies the contents of the directory, not the directory itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring nginx<\/h3>\n\n\n\n<p>Create an nginx configuration file for your site:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo nano \/etc\/nginx\/sites-available\/yourdomain.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nano<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/nginx\/sites-available\/yourdomain.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Add this configuration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>server {\n    listen 80;\n    listen [::]:80;\n\n    server_name yourdomain.com www.yourdomain.com;\n    root \/var\/www\/yourdomain.com;\n    index index.html;\n\n    # Enable gzip compression\n    gzip on;\n    gzip_vary on;\n    gzip_proxied any;\n    gzip_comp_level 6;\n    gzip_types text\/plain text\/css application\/json application\/javascript text\/xml application\/xml application\/xml+rss text\/javascript image\/svg+xml;\n\n    # Cache static assets\n    location ~* \\.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ {\n        expires 1y;\n        add_header Cache-Control \"public, immutable\";\n    }\n\n    # Handle requests\n    location \/ {\n        try_files $uri $uri\/ =404;\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">server<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">listen<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">80<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">listen<\/span><span style=\"color: #E1E4E8\"> [::]:80;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">server_name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">www.yourdomain.com<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">root<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">index<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">index.html<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\"># Enable gzip compression<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">gzip<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">on<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">gzip_vary<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">on<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">gzip_proxied<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">any<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">gzip_comp_level<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">6<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">gzip_types<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">text\/plain<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">text\/css<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">application\/json<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">application\/javascript<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">text\/xml<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">application\/xml<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">application\/xml+rss<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">text\/javascript<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">image\/svg+xml<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\"># Cache static assets<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~<\/span><span style=\"color: #79B8FF\">*<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\.<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #B392F0\">css<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">js<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">jpg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">jpeg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">png<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">gif<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">ico<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">svg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">woff<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">woff2<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">ttf<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">eot<\/span><span style=\"color: #E1E4E8\">)$ <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">expires<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #9ECBFF\">y<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Cache-Control<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"public, immutable\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\"># Handle requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">try_files<\/span><span style=\"color: #E1E4E8\"> $uri $uri<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">=<\/span><span style=\"color: #79B8FF\">404<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This configuration handles both IPv4 and IPv6, enables compression for text-based files, and sets aggressive caching for static assets. The <code>try_files<\/code> directive tells nginx to look for exact file matches first, then try treating the URL as a directory, and finally return a 404 if nothing matches.<\/p>\n\n\n\n<p>Enable the site by creating a symbolic link:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo ln -s \/etc\/nginx\/sites-available\/yourdomain.com \/etc\/nginx\/sites-enabled\/<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ln<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-s<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/nginx\/sites-available\/yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/nginx\/sites-enabled\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Test your configuration for syntax errors:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo nginx -t<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-t<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>If the test passes, reload nginx:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo systemctl reload nginx<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">reload<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Setting Up SSL with Let\u2019s Encrypt<\/h3>\n\n\n\n<p>Never run a website without HTTPS in 2025. Let\u2019s Encrypt provides free SSL certificates with automated renewal.<\/p>\n\n\n\n<p>Install Certbot:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo apt install certbot python3-certbot-nginx -y<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">certbot<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">python3-certbot-nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Request a certificate:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">certbot<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">www.yourdomain.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Certbot will ask for your email address and automatically configure SSL in your nginx setup. It modifies your configuration to redirect HTTP traffic to HTTPS and adds the necessary SSL directives.<\/p>\n\n\n\n<p>Test automatic renewal:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo certbot renew --dry-run<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">certbot<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">renew<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--dry-run<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>If this succeeds, your certificates will renew automatically every 90 days. No manual intervention required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deploying Framework-Based Sites<\/h2>\n\n\n\n<p>AI tools like Framer generate React or Next.js applications. These need compilation before deployment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Building the Application<\/h3>\n\n\n\n<p>If your exported code includes a <code>package.json<\/code> file, you\u2019re working with a Node.js application. Install dependencies and build:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/path\/to\/exported\/code\nnpm install\nnpm run build<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/path\/to\/exported\/code<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">build<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This creates a production-optimized version of your site, usually in a <code>build\/<\/code>, <code>dist\/<\/code>, or <code>.next\/<\/code> directory. Check the documentation for your specific framework.<\/p>\n\n\n\n<p>For Next.js applications, you have two deployment options: <strong>static export<\/strong> or <strong>Node.js server<\/strong>.<\/p>\n\n\n\n<p><strong>Static export<\/strong> converts your Next.js app to plain HTML\/CSS\/JavaScript:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>npm run build<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">build<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Then deploy the <code>out\/<\/code> directory following the static site instructions above.<\/p>\n\n\n\n<p><strong>Node.js server<\/strong> keeps your app dynamic, which you need for features like server-side rendering or API routes. This requires running Node.js on your server with a process manager like PM2.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Running Node.js Applications with PM2<\/h3>\n\n\n\n<p>Install Node.js on your server:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -fsSL https:\/\/deb.nodesource.com\/setup_20.x | sudo -E bash -\nsudo apt install -y nodejs<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">curl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-fsSL<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/deb.nodesource.com\/setup_20.x<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-E<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">bash<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">-<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nodejs<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Install PM2 globally:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo npm install -g pm2<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-g<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">pm2<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Upload your built application to your server, then start it with PM2:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/var\/www\/yourdomain.com\npm2 start npm --name \"yourdomain\" -- start\npm2 save\npm2 startup<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">pm2<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">start<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"yourdomain\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">start<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">pm2<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">save<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">pm2<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">startup<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Configure nginx as a reverse proxy. Edit your nginx configuration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>server {\n    listen 80;\n    server_name yourdomain.com www.yourdomain.com;\n\n    location \/ {\n        proxy_pass http:\/\/localhost:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection 'upgrade';\n        proxy_set_header Host $host;\n        proxy_cache_bypass $http_upgrade;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">server<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">listen<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">80<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">server_name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">www.yourdomain.com<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_pass<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">http:\/\/localhost:3000<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_http_version<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">1.1<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Upgrade<\/span><span style=\"color: #E1E4E8\"> $http_upgrade;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Connection<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'upgrade'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Host<\/span><span style=\"color: #E1E4E8\"> $host;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_cache_bypass<\/span><span style=\"color: #E1E4E8\"> $http_upgrade;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-Real-IP<\/span><span style=\"color: #E1E4E8\"> $remote_addr;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-Forwarded-For<\/span><span style=\"color: #E1E4E8\"> $proxy_add_x_forwarded_for;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">proxy_set_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-Forwarded-Proto<\/span><span style=\"color: #E1E4E8\"> $scheme;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This forwards all requests to your Node.js application running on port 3000. Add SSL using Certbot as described earlier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Automating Deployments with GitHub Actions<\/h2>\n\n\n\n<p>Manual deployments work fine initially, but you\u2019ll want automation once you start making changes. GitHub Actions can build and deploy your site automatically whenever you push code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting Up Your Repository<\/h3>\n\n\n\n<p>Initialize a git repository in your local code directory:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/path\/to\/your\/website\ngit init\ngit add .\ngit commit -m \"Initial commit\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/path\/to\/your\/website<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">init<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">add<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">commit<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-m<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"Initial commit\"<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Create a repository on GitHub and push your code:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>git remote add origin https:\/\/github.com\/yourusername\/yourrepo.git\ngit branch -M main\ngit push -u origin main<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">remote<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">add<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">origin<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/github.com\/yourusername\/yourrepo.git<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">branch<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-M<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">main<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">push<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-u<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">origin<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">main<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Creating Deployment Secrets<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-add-ssh-keys-to-your-github-account\/\">GitHub needs your SSH private key<\/a> to connect to your server. Go to your repository settings, then Secrets and Variables \u2192 Actions.<\/p>\n\n\n\n<p>Add these secrets:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>SSH_PRIVATE_KEY<\/code>: Your deploy user\u2019s private SSH key<\/li>\n\n\n\n<li><code>SSH_HOST<\/code>: Your server\u2019s IP address or domain<\/li>\n\n\n\n<li><code>SSH_USER<\/code>: Your deploy username (usually \u201cdeploy\u201d)<\/li>\n\n\n\n<li><code>DEPLOY_PATH<\/code>: The deployment path on your server (e.g., <code>\/var\/www\/yourdomain.com<\/code>)<\/li>\n<\/ul>\n\n\n\n<p>To get your private key:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cat ~\/.ssh\/id_ed25519<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">cat<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~\/.ssh\/id_ed25519<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Copy the entire output including the <code>-----BEGIN<\/code> and <code>-----END<\/code> lines.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the Workflow<\/h3>\n\n\n\n<p>Create a <code>.github\/workflows\/deploy.yml<\/code> file in your repository:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>name: Deploy to VPS\n\non:\n  push:\n    branches: [ main ]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout code\n      uses: actions\/checkout@v3\n\n    - name: Deploy via rsync\n      uses: burnett01\/rsync-deployments@7.1.0\n      with:\n        switches: -avzr --delete\n        path: .\/\n        remote_path: ${{ secrets.DEPLOY_PATH }}\n        remote_host: ${{ secrets.SSH_HOST }}\n        remote_user: ${{ secrets.SSH_USER }}\n        remote_key: ${{ secrets.SSH_PRIVATE_KEY }}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Deploy<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">to<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">VPS<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #B392F0\">push:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">branches:<\/span><span style=\"color: #E1E4E8\"> [ <\/span><span style=\"color: #9ECBFF\">main<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #79B8FF\">jobs<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #B392F0\">deploy:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">runs-on:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ubuntu-latest<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">steps:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Checkout<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">code<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">uses:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">actions\/checkout@v3<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Deploy<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">via<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">rsync<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">uses:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">burnett01\/rsync-deployments@7.1.0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">with:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">switches:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-avzr<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--delete<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">path:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_path:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.DEPLOY_PATH }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_host:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_HOST }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_user:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_USER }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_key:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_PRIVATE_KEY }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>For framework-based sites, add build steps before deployment:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>name: Deploy to VPS\n\non:\n  push:\n    branches: [ main ]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout code\n      uses: actions\/checkout@v3\n\n    - name: Setup Node.js\n      uses: actions\/setup-node@v3\n      with:\n        node-version: '20'\n\n    - name: Install dependencies\n      run: npm ci\n\n    - name: Build application\n      run: npm run build\n\n    - name: Deploy via rsync\n      uses: burnett01\/rsync-deployments@7.1.0\n      with:\n        switches: -avzr --delete\n        path: .\/dist\/\n        remote_path: ${{ secrets.DEPLOY_PATH }}\n        remote_host: ${{ secrets.SSH_HOST }}\n        remote_user: ${{ secrets.SSH_USER }}\n        remote_key: ${{ secrets.SSH_PRIVATE_KEY }}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Deploy<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">to<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">VPS<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #B392F0\">push:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">branches:<\/span><span style=\"color: #E1E4E8\"> [ <\/span><span style=\"color: #9ECBFF\">main<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #79B8FF\">jobs<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #B392F0\">deploy:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">runs-on:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ubuntu-latest<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">steps:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Checkout<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">code<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">uses:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">actions\/checkout@v3<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Setup<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Node.js<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">uses:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">actions\/setup-node@v3<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">with:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">node-version:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'20'<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dependencies<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">run:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ci<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Build<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">application<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">run:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">build<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Deploy<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">via<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">rsync<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">uses:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">burnett01\/rsync-deployments@7.1.0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">with:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">switches:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-avzr<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--delete<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">path:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/dist\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_path:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.DEPLOY_PATH }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_host:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_HOST }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_user:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_USER }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">remote_key:<\/span><span style=\"color: #E1E4E8\"> ${{ secrets.SSH_PRIVATE_KEY }<\/span><span style=\"color: #9ECBFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Commit and push this workflow file. GitHub will automatically run it on every push to the main branch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security Considerations for AI Builder-Generated Code<\/h2>\n\n\n\n<p>Code from AI website builders introduces specific security risks you can\u2019t ignore. <a href=\"https:\/\/www.veracode.com\/blog\/ai-generated-code-security-risks\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Research from Veracode<\/a> shows that 45% of AI-generated code contains security vulnerabilities, with Java having the highest failure rate at 72%. While AI builders produce more polished output than raw code generators, you still need to validate what they create.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common Vulnerabilities in AI Builder Output<\/h3>\n\n\n\n<p><strong>Input validation failures<\/strong> are widespread. AI builders often generate code that accepts user input without sanitization. If your site from an AI builder has any forms or URL parameters, inspect the JavaScript for proper validation.<\/p>\n\n\n\n<p><strong>Cross-site scripting (XSS)<\/strong> appears in 86% of AI-generated code samples. AI models don\u2019t automatically escape user-generated content. Check any dynamic content rendering in your JavaScript.<\/p>\n\n\n\n<p><strong>Dependency issues<\/strong> happen when AI suggests outdated or non-existent packages. Always verify that imported libraries exist and are current. Run <code>npm audit<\/code> for Node.js projects to check for known vulnerabilities.<\/p>\n\n\n\n<p><strong>Overly permissive configurations<\/strong> occur because AI optimizes for functionality, not security. Review any CORS headers, API endpoints, or file permissions in your code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security Hardening Steps<\/h3>\n\n\n\n<p>Run security scans on your exported code before deployment:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># For Node.js projects\nnpm audit --audit-level=moderate\n\n# For static sites, check for common issues\ngrep -r \"eval(\" .\/\ngrep -r \"innerHTML\" .\/\ngrep -r \"document.write\" .\/<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># For Node.js projects<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">audit<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--audit-level=moderate<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"># For static sites, check for common issues<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">grep<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-r<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"eval(\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">grep<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-r<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"innerHTML\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">grep<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-r<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"document.write\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>These patterns often indicate security problems. <code>eval()<\/code> can execute arbitrary code, <code>innerHTML<\/code> can introduce XSS vulnerabilities, and <code>document.write()<\/code> can cause various issues.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/content-security-policy-csp-headers\/\">Implement Content Security Policy (CSP) headers<\/a> in your nginx configuration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>add_header Content-Security-Policy \"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;\" always;\nadd_header X-Content-Type-Options \"nosniff\" always;\nadd_header X-Frame-Options \"SAMEORIGIN\" always;\nadd_header X-XSS-Protection \"1; mode=block\" always;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Content-Security-Policy<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">always<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-Content-Type-Options<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"nosniff\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">always<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-Frame-Options<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"SAMEORIGIN\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">always<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">X-XSS-Protection<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"1; mode=block\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">always<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>These headers prevent common attacks by restricting what resources your site can load and how browsers handle your content.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Regular Updates and Monitoring<\/h3>\n\n\n\n<p>Set up automatic security updates on your server:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo apt install unattended-upgrades -y\nsudo dpkg-reconfigure --priority=low unattended-upgrades<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">unattended-upgrades<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dpkg-reconfigure<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--priority=low<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">unattended-upgrades<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Monitor your nginx logs for suspicious activity:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo tail -f \/var\/log\/nginx\/access.log\nsudo tail -f \/var\/log\/nginx\/error.log<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">tail<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-f<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/log\/nginx\/access.log<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">tail<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-f<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/log\/nginx\/error.log<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Look for patterns like repeated 404 errors, requests to uncommon file extensions, or attempts to access admin paths that don\u2019t exist.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Performance Optimization<\/h2>\n\n\n\n<p>Code exported from AI website builders isn\u2019t always optimized for performance. These adjustments will significantly improve load times.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable HTTP\/2<\/h3>\n\n\n\n<p>HTTP\/2 allows browsers to load multiple resources simultaneously. Edit your nginx SSL configuration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>listen 443 ssl http2;\nlisten [::]:443 ssl http2;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">listen<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">443<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ssl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">http2<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">listen<\/span><span style=\"color: #E1E4E8\"> [::]:443 ssl http2;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Reload nginx to apply the change.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Optimize Images<\/h3>\n\n\n\n<p>Sites from AI builders often include unoptimized images. Install image optimization tools on your server:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo apt install jpegoptim optipng -y<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">jpegoptim<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">optipng<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Optimize all images in your web directory:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>find \/var\/www\/yourdomain.com -name \"*.jpg\" -exec jpegoptim --strip-all --max=85 {} \\;\nfind \/var\/www\/yourdomain.com -name \"*.png\" -exec optipng -o2 {} \\;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">find<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"*.jpg\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-exec<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">jpegoptim<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--strip-all<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--max=85<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{}<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">find<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"*.png\"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-exec<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">optipng<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-o2<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">{}<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Consider implementing WebP format with fallbacks for better compression.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Browser Caching<\/h3>\n\n\n\n<p>Add cache headers for all static resources in your nginx configuration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>location ~* \\.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ {\n    expires 1y;\n    add_header Cache-Control \"public, immutable\";\n}\n\nlocation ~* \\.(html)$ {\n    expires 1h;\n    add_header Cache-Control \"public, must-revalidate\";\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~<\/span><span style=\"color: #79B8FF\">*<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\.<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #B392F0\">css<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">js<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">jpg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">jpeg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">png<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">gif<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">ico<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">svg<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">woff<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">woff2<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">ttf<\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #B392F0\">eot<\/span><span style=\"color: #E1E4E8\">)$ <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">expires<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #9ECBFF\">y<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Cache-Control<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"public, immutable\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~<\/span><span style=\"color: #79B8FF\">*<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\.<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #B392F0\">html<\/span><span style=\"color: #E1E4E8\">)$ <\/span><span style=\"color: #9ECBFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">expires<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #9ECBFF\">h<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">add_header<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">Cache-Control<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"public, must-revalidate\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This caches assets for one year but checks HTML files every hour for updates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting Common Issues<\/h2>\n\n\n\n<p><strong>404 errors for CSS\/JavaScript<\/strong>: Check file paths in your HTML. Code exported from AI builders sometimes uses absolute paths that won\u2019t work on your server. Change <code>\/assets\/style.css<\/code> to <code>assets\/style.css<\/code> (relative path).<\/p>\n\n\n\n<p><strong>Permission denied errors<\/strong>: Your deploy user needs write access and nginx needs read access. Fix with:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo chown -R deploy:www-data \/var\/www\/yourdomain.com\nsudo chmod -R 755 \/var\/www\/yourdomain.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chown<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-R<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy:www-data<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chmod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-R<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">755<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/var\/www\/yourdomain.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><strong>Mixed content warnings<\/strong>: Your site loads over HTTPS but references HTTP resources. Update all asset URLs to use HTTPS or protocol-relative URLs (<code>\/\/example.com\/image.jpg<\/code>).<\/p>\n\n\n\n<p><strong>nginx configuration errors<\/strong>: Always test before reloading:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>sudo nginx -t<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-t<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This catches syntax errors before they break your live site.<\/p>\n\n\n\n<p><strong>GitHub Actions deployment failures<\/strong>: Check your SSH key format and ensure your deploy user has write permissions. Test SSH access manually:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ssh -i ~\/.ssh\/id_ed25519 deploy@your-server-ip \"ls -la \/var\/www\/yourdomain.com\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-i<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~\/.ssh\/id_ed25519<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">deploy@your-server-ip<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"ls -la \/var\/www\/yourdomain.com\"<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Moving Forward<\/h2>\n\n\n\n<p>Deploying websites from AI builders to your own infrastructure gives you control that platform-locked solutions can\u2019t match. You manage performance, security, and costs directly. You can host dozens of sites on a single VPS or dedicated server with InMotion Hosting.<\/p>\n\n\n\n<p>Start with static sites to learn the workflow. Once you\u2019re comfortable with manual deployments, add GitHub Actions for automation. Test your security configuration regularly and keep your server updated.<\/p>\n\n\n\n<p>The AI tools will keep improving, but the deployment fundamentals remain constant. Master nginx, understand SSH and rsync, and you\u2019ll be able to deploy any AI-generated code to your own infrastructure.<\/p>\n\n\n<div class=\"jumbotron\" style=\"text-align:center;\">\r\n<p style=\"font-size: 20px;\"><strong>Scalable VPS Infrastructure, Fully Managed<\/strong><\/p>\r\n<p>When shared hosting can't handle your traffic, VPS delivers dedicated resources that scale with demand. Our team manages the technical complexity while you manage your business.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>NVMe Storage &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>High-Availability &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Ironclad Security &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Premium Support<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=vps-cta2\">VPS Hosting<\/a><\/p>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AI website builders can spit out functional sites in minutes. Tools like Wix AI, TeleportHQ, and Framer generate clean HTML, CSS, and JavaScript based on simple prompts. But here&#8217;s the catch: most of these platforms want to lock you into their hosting ecosystem. You pay monthly, you follow their rules, and you&#8217;re stuck with whatever<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\"> Read More ><\/a><\/p>\n","protected":false},"author":56983,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-131067","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Deploy Websites Generated by AI Builders | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deploy Websites Generated by AI Builders | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-07T20:27:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-12T23:09:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Carrie Smaha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@carriesmaha\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carrie Smaha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\"},\"author\":{\"name\":\"Carrie Smaha\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\"},\"headline\":\"How to Deploy Websites Generated by AI Builders on Your Server\",\"datePublished\":\"2025-11-07T20:27:47+00:00\",\"dateModified\":\"2025-11-12T23:09:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\"},\"wordCount\":1978,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png\",\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\",\"name\":\"How to Deploy Websites Generated by AI Builders | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png\",\"datePublished\":\"2025-11-07T20:27:47+00:00\",\"dateModified\":\"2025-11-12T23:09:42+00:00\",\"description\":\"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png\",\"width\":1200,\"height\":630,\"caption\":\"How to Deploy Websites Generated by AI Builders on Your Server\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Deploy Websites Generated by AI Builders on Your Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\",\"name\":\"Carrie Smaha\",\"description\":\"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/carriesmaha\/\",\"https:\/\/x.com\/carriesmaha\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Deploy Websites Generated by AI Builders | InMotion Hosting","description":"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.","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:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Deploy Websites Generated by AI Builders | InMotion Hosting","og_description":"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2025-11-07T20:27:47+00:00","article_modified_time":"2025-11-12T23:09:42+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png","type":"image\/png"}],"author":"Carrie Smaha","twitter_card":"summary_large_image","twitter_creator":"@carriesmaha","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Carrie Smaha","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/"},"author":{"name":"Carrie Smaha","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8"},"headline":"How to Deploy Websites Generated by AI Builders on Your Server","datePublished":"2025-11-07T20:27:47+00:00","dateModified":"2025-11-12T23:09:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/"},"wordCount":1978,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png","articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/","name":"How to Deploy Websites Generated by AI Builders | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png","datePublished":"2025-11-07T20:27:47+00:00","dateModified":"2025-11-12T23:09:42+00:00","description":"Learn the complete process of deploying websites from AI builders to your server, from exporting code to automated deployment with GitHub Actions and security best practices.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/11\/Deploy-Websites-Generated-by-AI-Builders.png","width":1200,"height":630,"caption":"How to Deploy Websites Generated by AI Builders on Your Server"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/deploy-ai-generated-websites-to-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Deploy Websites Generated by AI Builders on Your Server"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8","name":"Carrie Smaha","description":"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.","sameAs":["https:\/\/www.linkedin.com\/in\/carriesmaha\/","https:\/\/x.com\/carriesmaha"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4288,"name":"Website","slug":"website","link":"https:\/\/www.inmotionhosting.com\/support\/website\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/131067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/56983"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=131067"}],"version-history":[{"count":7,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/131067\/revisions"}],"predecessor-version":[{"id":131126,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/131067\/revisions\/131126"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=131067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=131067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=131067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}