Skip to content

Cloudflare Pages: The Complete Guide

A comprehensive, multi-audience guide for building and deploying websites on Cloudflare Pages — whether migrating from WordPress or building from scratch.


Designers

  • Start with: Business Case — Understand the shift from WordPress/Divi
  • Key sections: Content Editing — How to make visual changes
  • Reference: Optimization — Performance constraints that affect design

Cloudflare Pages is a static site hosting platform built into Cloudflare’s global network (300+ edge locations worldwide). It serves pre-built HTML, CSS, and JavaScript files directly from the CDN edge — no server, no PHP, no database.

Cloudflare global network map showing 300+ data center locations across all continents
FeatureDescription
Static hostingPre-built HTML/CSS/JS served from CDN
Serverless functionsBackend logic via Cloudflare Functions (Workers)
Global CDN300+ edge locations, automatic
Free SSLAutomatic HTTPS certificates
Free tier500 builds/month, unlimited bandwidth, 20K files/deploy
Workers Paid ($5/mo)5,000 builds/month, 10M requests/day, 100K files/deploy (per account, not per site)
Custom domainsConnect any domain
Git integrationAuto-deploy from GitHub/GitLab
Instant rollbackEvery deployment preserved, one-click rollback
Astro (first-party)Cloudflare acquired Astro in Jan 2026
Architecture comparison diagram: WordPress multi-layer stack versus Cloudflare Pages simplified static delivery
graph LR
  A[User Request] --> B[Web Server]
  B --> C[PHP Engine]
  C --> D[MySQL Database]
  D --> C
  C --> E[Generate HTML]
  E --> F[Send Response]

Every page load runs PHP code, queries a database, and generates HTML on the fly. This requires a server running 24/7.

In January 2026, Cloudflare acquired The Astro Technology Company. Astro is now Cloudflare’s first-party web framework — the recommended way to build content-driven websites on Cloudflare Pages.

What Astro Brings

  • Content-focused framework (perfect for marketing sites, blogs, docs)
  • Component-based development (React, Vue, Svelte compatible)
  • Static site generation with optional server-side rendering
  • Content Collections for structured content management
  • Built-in image optimization
  • CMS integrations (Decap, Tina, Contentful, etc.)

The Analogy

Think of it as: WordPress is to WordPress.com as Astro is to Cloudflare Pages.

Astro is the framework. Cloudflare Pages is the hosting platform. Together they form a complete, modern web publishing stack.


Standard WordPress
$100-300
per site / month
Typical hosting + premium plugins + security + CDN + maintenance
Optimized WordPress
~$50
per site / month
Unlimited licenses + minimal maintenance with unlimited licenses
Cloudflare Pages
$5/mo
total (per account, not per site)
Workers Paid plan covers unlimited sites, no maintenance overhead
Cost ItemMonthlyAnnual
Hosting (managed WP)$20-50$240-600
Premium theme (Divi)$7-15$89-180
Premium plugins (5-10)$15-40$180-480
Security plugin/service$5-15$60-180
Backup service$5-10$60-120
SSL certificate$0-10$0-120
CDN (if separate)$0-20$0-240
Subtotal (tools)$52-160$629-1,920
Maintenance time (2-4 hrs/mo)$50-200$600-2,400
Total per site$100-360$1,200-4,320
Cost ItemMonthlyAnnual
HostingFreeFree
SSL certificateFreeFree
CDNFreeFree
DDoS protectionFreeFree
Functions (forms)FreeFree
Email (SendGrid free)FreeFree
Workers Paid plan$5/account$60/account
Total per site~$0~$0

BenefitImpact
Near-zero hosting cost$5/month total (Workers Paid covers entire account)
Superior performanceStatic files from 300+ edge locations
Built-in securityNo PHP/MySQL attack surface, automatic DDoS protection
No plugin managementNo updates, no vulnerabilities, no conflicts
No server maintenanceNo PHP versions, no MySQL tuning, no server patches
AI-compatibleStatic HTML/Astro can be directly edited by AI tools
Instant rollbackEvery deployment preserved, one-click revert
Global scaleHandles traffic spikes without upgrading hosting
99.99%+ uptimeCloudflare’s infrastructure

Marketing / Brochure Sites

Practice websites, “about us” pages

Landing Pages

PPC campaigns, conversion pages

Portfolio Sites

Showcase work, case studies

Documentation

Guides, manuals, knowledge bases

Blogs

Content-focused sites (Astro excels here)

Small Business Sites

5-50 pages, mostly static content

Performance-Critical Sites

Core Web Vitals, SEO ranking focused

An honest assessment of what locks you into Cloudflare and how hard it is to leave.

ComponentLock-In RiskNotes
DNS on CloudflareLowMoving DNS requires updating nameservers at registrar + TTL propagation (hours to days)
Pages FunctionsMediumWritten for Workers runtime, not standard Node.js. Would need rewrite for Vercel/Netlify
R2 storageLowS3-compatible API, data is portable
KV/D1HighProprietary APIs, locked in if used
Static HTML/CSS/JSNoneRuns anywhere — Netlify, Vercel, S3, any web server
Astro sitesNoneFramework-agnostic, adapters for all platforms
Site TypeExit DifficultyWhat’s Involved
Static HTML sitesEasyCopy files to any host
Astro sitesEasyChange adapter, deploy elsewhere
Sites with form FunctionsMediumRewrite 1 serverless function per site
Sites using KV/D1/Durable ObjectsHardRewrite data layer entirely
  • Git repositories are yours — source code deploys anywhere
  • R2 content uses S3-compatible API — can mirror to AWS S3
  • Astro has adapters for Vercel, Netlify, Node.js, and Deno
  • Static output is just HTML/CSS/JS files — the most portable format possible

#DocumentAudiencePurpose
00Overview (this page)EveryoneOverview and orientation
01Business CaseLeadership, PMsBusiness case, costs, ROI
02Decision GuidePMs, LeadershipWhich sites to migrate, scoring
03PrerequisitesDevelopersTools, accounts, setup
04WordPress MigrationDevelopersWordPress to Cloudflare process
05Fresh BuildDevelopers, DesignersBuilding from scratch
06Content EditingEveryone4 ways to make changes
07Plugin ReplacementsDevelopers, PMsWordPress plugin alternatives
08OptimizationDevelopers, DesignersPerformance tuning
09DeploymentDevelopersDeploy, domains, DNS
10Testing & ValidationDevelopers, QATesting and quality
11TroubleshootingDevelopersCommon issues and fixes
12Project ManagementPMs, LeadershipChecklists, timelines
13MaintenanceEveryonePost-launch operations

  1. Read the Business Case
  2. Share the cost comparison
  3. Show the candidate scoring in the Decision Guide

  • Commands are shown in code blocks: npm run deploy
  • File paths are relative to the project root
  • Cost figures are based on 2025-2026 pricing and real-world experience
  • WordPress references assume WordPress.org (self-hosted), not WordPress.com
  • “Site” means a single website/domain unless otherwise noted
  • Checklists use checkbox format for tracking progress