Static Site Hosting on Cloudflare

Deploy your static sites with Cloudflare Pages for global performance and reliability

There two methods to deploy your static site on Cloudflare Pages.

Method 1: Connect a Git Repository

1. Prepare Your Static Site

  • Click on 'Save & Download' in ThemesForApp builder dashboard to get your site files.
  • Downloaded file is the static site ready for deployment.

2. Push Your Code to GitHub, GitLab, or Bitbucket

  • Unzip the downloaded file and push it to a repository on GitHub, GitLab, or Bitbucket.
  • Cloudflare Pages will connect to your repository to deploy your site.

3. Create a Cloudflare Account

  • Sign up at Cloudflare (https://dash.cloudflare.com/sign-up) if you don’t have an account.

4. Create a New Project in Cloudflare Pages

  • Go to the Cloudflare Dashboard > Compute (Workers) > Workers & Pages > Create > Pages > Import an existing Git repository
  • Connect your Git provider and select your repository.

5. Configure Build Settings

  • Set the Build command (e.g., npm run build or leave blank for plain HTML/CSS/JS).
  • Set the Output directory (e.g., dist, build, or public).

6. Deploy Your Site

  • Click Save and Deploy.
  • Cloudflare Pages will build and deploy your site automatically.

7. Access Your Live Site

  • After deployment, you’ll get a cloudflarepages.dev URL.
  • You can add a custom domain from the Pages dashboard if desired.

Method 2: Drag and Drop File Upload

1. Build Your Static Site

  • Generate your static site files (HTML, CSS, JS, assets) using your preferred framework or manually.
  • Ensure all files are in a single folder (e.g., dist, build, or public).

2. Create a Cloudflare Account

  • Sign up at Cloudflare (https://dash.cloudflare.com/sign-up) if you don’t have an account.

3. Go to Cloudflare Pages

  • Navigate to the Cloudflare Dashboard > Pages.

4. Click 'Upload Assets'

  • Click the Upload Assets button.
  • Drag and drop your output folder (or select files) into the upload area.

5. Deploy and Access Your Site

  • After upload, Cloudflare will deploy your site and provide a cloudflarepages.dev URL.
  • You can add a custom domain from the Pages dashboard if desired.