diff --git a/migration-to-cloudflare-pages.md b/migration-to-cloudflare-pages.md new file mode 100644 index 0000000..db43e9a --- /dev/null +++ b/migration-to-cloudflare-pages.md @@ -0,0 +1,63 @@ +# Migration Guide: UpCloud to Cloudflare Pages + +This guide outlines the steps to migrate the GeeksHacking static website from its current UpCloud instance to Cloudflare Pages. + +## 1. Prerequisites + +Before starting the migration, ensure you have: +* Access to the GeeksHacking Cloudflare account. +* Admin access to the GitHub repository containing the website code. +* Access to the domain registrar (where `geekshacking.com` is registered) to update DNS records. + +## 2. Setting up Cloudflare Pages + +1. Log in to your Cloudflare Dashboard. +2. Navigate to **Workers & Pages** in the left sidebar. +3. Click **Create application**, then select the **Pages** tab. +4. Click **Connect to Git**. +5. Select **GitHub** and authorize Cloudflare to access your repositories. +6. Select the `GeeksHacking` repository. +7. Configure the build settings: + * **Project name:** Choose a name (e.g., `geekshacking-website`). + * **Production branch:** Typically `master` or `main`. + * **Framework preset:** Select `None` (since this is a plain HTML/CSS/JS site). + * **Build command:** Leave empty. + * **Build output directory:** Leave empty (defaults to the root directory where `index.html` is located). +8. Click **Save and Deploy**. Cloudflare Pages will build and deploy your site to a temporary `.pages.dev` subdomain. + +## 3. Addressing Server-Side Code (`mailer.php`) + +**Important:** Cloudflare Pages only hosts static files (HTML, CSS, JS, images). It **does not** support running PHP scripts like `mailer.php`. + +The contact form in `index.html` currently seems to be commented out, but if you need a functional contact form, you will have to replace `mailer.php` with a serverless solution. + +**Options for replacing `mailer.php`:** + +1. **Formspree or similar services:** + * Sign up for Formspree (or Netlify Forms, getform.io, etc.). + * They provide an endpoint URL. + * Update the `