If you want to know how to host WordPress on Cloudflare, the honest starting point is this: Cloudflare does not run PHP or MySQL, so it cannot host a standard WordPress install by itself. What it can do is serve a static export of your site on Cloudflare Pages, or sit in front of a real WordPress host as a global edge layer. Both are legitimate setups, and this guide walks through each one, plus the trade-offs nobody mentions until your contact form stops working.
Can Cloudflare Actually Host a WordPress Site?
Not in the traditional sense. WordPress needs a PHP runtime and a MySQL or MariaDB database, as the official WordPress requirements page spells out. Cloudflare’s platform is built around edge compute (Workers), static asset delivery (Pages), object storage (R2) and SQLite-style databases (D1), which is a different architecture entirely.
So when people ask “does Cloudflare host websites?”, the answer is yes for static sites and Workers apps, and no for a plain WordPress installation. That distinction drives every decision below.
The Three Real Ways to Run WordPress With Cloudflare
- Cloudflare in front of managed WordPress hosting. Your site stays on a PHP host, and Cloudflare handles DNS, SSL, caching, DDoS filtering and CDN delivery. This is what roughly 90% of “Cloudflare WordPress” setups actually are.
- Cloudflare Pages with a static export. You build WordPress locally or on a private origin, export it to HTML, and deploy those files to Cloudflare Pages. Fast and cheap, with real functional limits.
- Workers plus D1 or a headless setup. WordPress runs as a headless CMS somewhere, and a Worker serves the front end. Powerful, but it needs a developer and ongoing maintenance.
Reddit threads on this topic circle the same conclusion. People arrive wanting free hosting and leave with a hybrid: a proper origin host, with Cloudflare doing the heavy lifting at the edge.
Method 1: Put Cloudflare in Front of Your WordPress Host
This is the setup we recommend for most sites, because you keep every dynamic feature and still get edge caching in 300-plus cities. Expect the whole process to take 20 to 40 minutes, plus DNS propagation.
- Create a free Cloudflare account and add your domain. Cloudflare scans your existing DNS records automatically.
- Verify the imported records, especially A, CNAME and MX. A missing MX record is the single most common way people break their email during this step.
- Update your nameservers at your registrar to the two Cloudflare nameservers shown in the dashboard. Propagation usually completes within 2 to 24 hours.
- Set SSL/TLS mode to Full (Strict) so traffic is encrypted between Cloudflare and your origin. Flexible mode causes redirect loops on WordPress more often than any other setting.
- Install the official Cloudflare plugin from the WordPress repository and connect it with an API token. It handles cache purging on publish and one-click optimization defaults.
- Enable Automatic Platform Optimization (APO) if you want HTML cached at the edge. It runs $5 per month on the Free plan and is included with Pro and above.
If you are not sure who currently runs your site, our guide on how to find out who hosts your WordPress site covers six quick checks before you touch DNS.
Method 2: Deploy WordPress to Cloudflare Pages as a Static Site
Cloudflare Pages serves pre-built HTML, CSS, JavaScript and images from the edge. To use it with WordPress, you generate those files first and then push them to Pages.
- Run WordPress somewhere private: a local environment like LocalWP, a staging subdomain, or a small origin server nobody links to publicly.
- Install a static export plugin such as Simply Static, WP2Static or Static Studio. Each crawls your site and writes out flat files.
- Export the build to a folder or straight to a connected Git repository. A 200-page site typically exports in 2 to 10 minutes.
- Create a Pages project in the Cloudflare dashboard, connect the repo or upload the folder directly, then set the build output directory.
- Point your domain at the Pages project with a custom domain record, and confirm the automatic SSL certificate has issued.
- Re-export and redeploy every time you publish. Read the Cloudflare Pages docs for build limits and deployment hooks before you commit to this workflow.
What Breaks When WordPress Goes Static
This is the part most tutorials skip, and it decides whether the approach fits you at all.
For a closer look at this topic, see our guide: Can You Host WordPress on Vercel? The Honest 2026 Answer.
- Native comments stop working and need a third-party service like Disqus or a Worker-based endpoint.
- Contact forms require an external handler, since there is no PHP to process a POST request.
- WordPress search has to be replaced with a client-side index or a hosted search API.
- WooCommerce, memberships and course sites are effectively out. Carts, logins and paywalls all need a live database.
- Scheduled posts will not appear until you trigger another export and deploy.
Plugin compatibility gets thin fast too, which we cover in more detail in this look at plugin support on managed hosting.
Cloudflare WordPress Pricing: What It Really Costs
Cloudflare’s Free plan covers DNS, unmetered DDoS protection, universal SSL and CDN caching at $0. Pages includes unlimited static requests and bandwidth on the free tier, with 500 builds per month.
Realistic monthly totals in 2026 look like this:
- Static site on Pages only: $0 to $5, plus your domain registration.
- Cloudflare Free plus APO in front of a host: $5, plus hosting.
- Cloudflare Pro plus hosting: $25, plus hosting.
- Workers Paid for dynamic edge logic: from $5 per month with usage-based overages.
The number people forget is the origin. Static exports still need somewhere to build, and dynamic sites always need PHP, which is why the total is rarely zero.
Cloudflare WordPress Security: Genuinely Strong, Not Complete
Edge security is where Cloudflare earns its reputation. The WAF blocks known WordPress exploit patterns, rate limiting slows brute-force attempts on wp-login.php, and bot management filters scrapers before they reach your server.
What Cloudflare does not do is patch a vulnerable plugin, scan your file system for injected code, or restore a compromised database. Those belong to your WordPress hosting security layer, which is why the hybrid model keeps winning.
Which Approach Fits Your Site?
- Documentation, portfolios and brochure sites: Cloudflare Pages works well. Designers and studios often pair it with a private build environment, though many prefer straightforward hosting built for creatives to avoid the redeploy step.
- News and publishing sites: stay dynamic. Frequent publishing, author roles and live comments all need PHP, and WordPress magazine hosting handles the traffic spikes that come with breaking stories.
- Anything with logins, carts or forms: managed hosting with Cloudflare layered on top, full stop.
One practical note: static exports strip out server-side stats, so plan your measurement early. Edge-level WordPress hosting analytics fill that gap without adding client-side scripts that slow the page.
Frequently Asked Questions
Can I host my website on Cloudflare for free?
Yes, if it is a static site: Cloudflare Pages offers unlimited requests and bandwidth on its $0 tier, with 500 builds per month and 20,000 files per deployment. A standard WordPress install still needs a PHP host, so “free” applies to the delivery layer, not the CMS itself.
Is it possible to host a website on Cloudflare?
Yes, for static sites and edge applications through Pages, Workers, R2 and D1. Cloudflare does not offer traditional PHP and MySQL hosting, so WordPress either gets exported to static files or runs on an origin host with Cloudflare in front.
Is Cloudflare good for website hosting?
It is excellent for static delivery and edge performance, with a network spanning more than 300 cities and typical time-to-first-byte under 100ms for cached assets. For dynamic WordPress features like carts, logins and forms, it works best as a companion to real hosting rather than a replacement.
How much does it cost to host a website on Cloudflare?
Most people pay between $0 and $25 per month on the Cloudflare side: Free covers DNS, SSL and CDN, APO adds $5, and Pro is $25. Add your WordPress host on top, which usually runs $20 to $60 monthly for a managed plan.
Want the Edge Speed Without the Static Limitations?
We run LiteSpeed caching, a global CDN and free SSL on every plan, so you get Cloudflare-grade delivery while your forms, comments and checkout keep working. Talk to a WordPress specialist at WebVibo and we will migrate your existing site at no charge.