Hosting · Info
Can You Host WordPress on Cloudflare? The Short Answer

Short answer
Not directly. Cloudflare does not run PHP or MySQL, which WordPress needs, so you still need a web host for the WordPress application. You can put Cloudflare in front of that host for caching and security, or export a static copy of your site and publish it on Cloudflare Pages.
Key takeaways
- Cloudflare is a CDN and security network, not a PHP and MySQL web host.
- The common setup is a normal WordPress host with Cloudflare acting as a proxy in front.
- APO or cache rules let Cloudflare cache full HTML pages at the edge.
- You can export WordPress to static files and deploy them to Cloudflare Pages.
- Static exports break forms, search, comments, logins and stores unless you add workarounds.
- Keep backups of the WordPress install that generates the static site.
Can you host WordPress on Cloudflare?
Not in the usual sense, because Cloudflare does not run PHP or MySQL, which WordPress needs; you can only put Cloudflare in front of a WordPress host or publish a static copy of your site on it.
This question comes up a lot because Cloudflare is everywhere in WordPress setups. Many site owners use it for DNS, SSL, caching and security, so it is easy to assume it can host the whole site.
The short version: Cloudflare is a network that sits between visitors and your server. It is not a traditional web host that runs the WordPress application itself.
This page explains what that means, the two ways people combine WordPress with Cloudflare, and which option fits which kind of site.
Why can't Cloudflare run WordPress directly?
WordPress needs a server that runs PHP and a MySQL or MariaDB database, and Cloudflare's platforms are built to run JavaScript and serve static files instead.
The official WordPress requirements page lists a recent PHP version, MySQL or MariaDB, and HTTPS support. Every page request on a normal WordPress site runs PHP code that reads from the database and builds HTML.
Cloudflare's developer products work differently. Cloudflare Pages serves static files, and Cloudflare Workers runs JavaScript and similar code at the edge. Neither is a PHP hosting environment where you can upload WordPress and run the installer.
So if you search for a Cloudflare WordPress hosting plan with cPanel, PHP and a database, you will not find one. Cloudflare's role is different, and that is not a weakness. It just means you need a host for the WordPress application.
What does Cloudflare actually do for a WordPress site?
Cloudflare usually acts as a reverse proxy in front of your real host, handling DNS, SSL, caching, security rules and bot protection while your server still runs WordPress.
When you point your domain's nameservers to Cloudflare and turn on the orange-cloud proxy, visitors connect to Cloudflare first. Cloudflare then fetches pages from your origin server, which is your actual WordPress host.
That setup gives you several benefits:
- Free SSL at the edge. Visitors get HTTPS through Cloudflare, and you can encrypt the connection to your host too. Our guide to Cloudflare SSL settings for WordPress covers the modes.
- Caching of static files. Images, CSS and JavaScript are served from data centers near your visitors.
- Security tools. The web application firewall, rate limiting and bot tools block a lot of junk traffic before it reaches your server.
- DNS management. Cloudflare's DNS is fast and free to use.
If you want step-by-step setup, read how to set up Cloudflare for WordPress. The key point is that your host still does the PHP and database work.
Can Cloudflare cache full WordPress pages?
Yes, with Automatic Platform Optimization or custom cache rules, Cloudflare can cache whole HTML pages, so many visits never reach your server, but WordPress still runs on your host.
By default, Cloudflare caches static files but not HTML. That means each page view still hits your server unless you add page caching on your host.
Cloudflare offers Automatic Platform Optimization (APO) for WordPress. It works with the official Cloudflare plugin to cache HTML at the edge and clear it when you update content.
We weigh the cost and limits in is Cloudflare APO for WordPress worth it.
You can also build your own rules. Our guide to Cloudflare cache rules for WordPress shows how to cache pages while bypassing the admin area, carts and logged-in users.
Full-page caching makes a WordPress site feel close to a static site for visitors. But your origin server still has to exist for the admin area, logins, form submissions and cache refreshes.
Can you publish a static WordPress site on Cloudflare Pages?
Yes, you can keep WordPress on a private or local install, export the site as static HTML with a plugin, and upload those files to Cloudflare Pages or Workers.
Cloudflare documents this approach in its guide to deploying a WordPress site to Pages. The idea is simple:
- Run WordPress somewhere you control, such as a local app on your computer or a small private server.
- Build and edit your site normally in the dashboard.
- Export the whole site to static files with a plugin such as Simply Static.
- Upload or deploy the exported files to Cloudflare Pages.
- Repeat the export every time you change content.
The public site is now plain HTML, CSS, JavaScript and images. There is no PHP and no database exposed to the internet, which cuts the attack surface a lot.
If you want a local WordPress install for this workflow, see how to install WordPress using Local.
What breaks when WordPress becomes a static site?
Anything that needs PHP at the moment a visitor acts will stop working, including native comments, built-in search, contact forms, logins, memberships and WooCommerce checkouts.
A static export freezes each page as a file. That is great for brochure sites, documentation and simple blogs. It is a poor fit for anything interactive.
Common things that need a workaround:
- Contact forms. You need a third-party form service or a serverless function to receive submissions.
- Search. WordPress search queries the database, so you need a client-side search tool instead.
- Comments. Native comments need PHP, so you would switch to an external comment system or turn them off.
- Scheduled posts. Nothing goes live until you run a new export.
- Ecommerce and memberships. Carts, checkouts and account pages need a live server, so a static copy is not realistic.
Some static export plugins offer add-ons for forms and search. Check the plugin's own documentation, as features differ between free and paid versions.
Static WordPress on Cloudflare vs a normal host behind Cloudflare
For most sites, a normal WordPress host with Cloudflare in front is simpler, while static export suits small content sites that rarely change and want very low hosting costs.
| Factor | WordPress host + Cloudflare proxy | Static export on Cloudflare Pages |
|---|---|---|
| Where PHP runs | Your web host | Only on your private or local install |
| Forms, search, comments | Work normally | Need third-party tools or custom code |
| WooCommerce and logins | Supported | Not practical |
| Publishing changes | Instant | Re-export and redeploy each time |
| Security exposure | WordPress admin is online | Public site is plain files |
| Ongoing cost | Hosting fee plus optional Cloudflare plan | Low, often only your local or private setup |
| Best for | Most blogs, businesses and stores | Brochure sites, docs, small blogs |
If you are weighing Cloudflare plans for the proxy option, our comparison of Cloudflare free vs Pro for WordPress explains what the paid tier adds.
Is there any way to run real WordPress at the edge?
Not in a way most site owners can use today; experiments exist, but standard WordPress still expects a PHP server and a database, so plan around a regular host.
Developers have built experiments that run PHP compiled to WebAssembly, the same idea behind WordPress Playground in the browser. These are interesting, but they are not a drop-in hosting option for a production site with plugins, uploads and traffic.
Cloudflare also has database and storage products for its own developer platform. They are designed for apps written for Workers, not for an unmodified WordPress install with MySQL queries and file uploads.
If you see a service advertising WordPress on Cloudflare, read the details. It usually means managed WordPress hosting that uses Cloudflare as its CDN, or a static export workflow. Both are valid, but neither is Cloudflare running PHP for you.
Which option should you choose?
Choose a regular WordPress host with Cloudflare in front if your site has forms, logins, a store or frequent updates, and choose static export only for simple sites you can rebuild easily.
A few quick rules help:
- Running a store or membership site? Use a proper host. A static copy cannot take payments.
- Publishing several posts a week? Use a host with Cloudflare and page caching. Re-exporting after every edit gets tiring.
- Small brochure site that rarely changes? Static export to Pages can work well and keeps the public site very fast.
- Worried about cost? Cheap shared hosting plus the free Cloudflare plan is often enough. Be careful with free hosts, though. We explain the trade-offs in is free WordPress hosting safe.
Whichever route you take, keep backups of the WordPress install itself. With a static setup, the local or private install is your real site. If you lose it, you lose the ability to edit.
How do you get started with either setup?
For the proxy setup, add your domain to Cloudflare and switch nameservers; for static hosting, install an export plugin, generate the files and deploy them to Pages.
Proxy setup, in short:
- Sign up for Cloudflare and add your domain.
- Check that the DNS records Cloudflare imports match your host's records.
- Change your nameservers at your domain registrar to the ones Cloudflare gives you.
- Set SSL to Full (strict) once your host has a valid certificate.
- Install the Cloudflare plugin if you want APO or automatic cache purging.
Static setup, in short:
- Build the site on a local or private WordPress install.
- Install a static export plugin and run an export.
- Create a Pages project in the Cloudflare dashboard and upload the output, or connect a Git repository.
- Add your custom domain to the Pages project.
- Re-export and redeploy whenever you change content.
Cloudflare also has a Workers tutorial for hosting static WordPress sites if you prefer Workers over Pages. Menu names in the Cloudflare dashboard change from time to time, so follow the current docs if a label looks different.
Frequently asked questions
Does Cloudflare offer WordPress hosting plans?
No. Cloudflare does not sell PHP and MySQL hosting where you install WordPress. It provides DNS, CDN, SSL, caching and security in front of a host, plus developer platforms such as Pages and Workers that serve static files or run JavaScript.
Is Cloudflare Pages free for a static WordPress site?
Cloudflare Pages has a free plan that suits many small static sites. Limits on builds, bandwidth and features can change, so check the current Pages pricing and limits in Cloudflare's documentation before you rely on it for a busy site.
Can I run WooCommerce on Cloudflare Pages?
No. WooCommerce needs PHP and a database for carts, checkout, payments and customer accounts. A static export cannot process orders. Run WooCommerce on a regular host and use Cloudflare in front of it, with cache rules that bypass cart and checkout pages.
Do I still need a web host if I use Cloudflare?
Yes, for a normal WordPress site. Cloudflare passes visitor requests to your origin server, which runs WordPress. The only exception is a static export, where the public site lives on Cloudflare Pages and WordPress runs privately on your computer or a small server.
Will a static WordPress site on Cloudflare be faster?
Usually it is very fast, because visitors get plain files from Cloudflare's network with no PHP or database work. A normal host with full-page caching through Cloudflare can come close, while keeping forms, logins and other dynamic features working.
Sources
- Deploy a WordPress site Cloudflare Docs
- Hosting static WordPress sites Cloudflare Docs
- Automatic Platform Optimization Cloudflare Docs
- Requirements WordPress.org
- Simply Static WordPress.org
- Cloudflare plugin WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


