Last checked: October 2026, against Cloudflare’s documentation (linked under Sources).
Can Cloudflare Pages run WordPress?
No. Pages serves static files, plus optional Functions written in JavaScript; there is no PHP and no MySQL. So WordPress keeps running somewhere else — your current host is fine — and Pages serves an exported, static copy of it. Visitors get the Pages copy; you keep editing in WordPress.
What the free plan includes
| Free plan | Why it matters for WordPress | |
|---|---|---|
| Static requests and bandwidth | Free and unlimited | Traffic to the exported pages costs nothing |
| Files per site | 20,000 | Media libraries are the usual reason to hit it |
| Maximum file size | 25 MiB per file | Large videos or PDFs need another home |
| Builds per month | 500 | Applies to Git builds on Cloudflare |
| Custom domains per project | 100 | Plenty for one site plus www and language domains |
| Redirect rules (_redirects) | 2,000 static + 100 dynamic | Enough to keep old WordPress URLs working |
| Header rules (_headers) | 100 | Caching and security headers |
Paid Cloudflare plans raise the file limit to 100,000 per site. Pages Functions, if you use them, are billed as Workers requests.
The 20,000-file limit and your media library
WordPress saves several sizes of every uploaded image, so the file count grows faster than you expect: 2,000 images with five sizes each is already 10,000 files, before pages, scripts and styles. Count the files in wp-content/uploads before you start. If you are close to the limit, remove unused image sizes, leave old uploads out of the export, or move to a paid Cloudflare plan.
Three ways to get files onto Pages
- Git integration: Cloudflare builds from a repository. It suits static site generators; with WordPress, you would first have to commit the exported files to Git.
- Direct Upload with Cloudflare’s wrangler command-line tool (up to 20,000 files), or by dragging files into the dashboard (up to 1,000 files). A project created with Direct Upload cannot be switched to Git later.
- The Cloudflare API, which is what Pinery Static uses. It implements Direct Upload in pure PHP, so it runs inside WordPress on shared hosting with no Node.js or wrangler, and uploads only files that changed.
Pages or Workers?
Cloudflare Workers can also serve static assets, and Cloudflare’s documentation notes that Workers has a broader set of features than Pages. Many developers now start new full-stack apps on Workers. For hosting a static copy of a WordPress site, Pages remains supported and is the simpler choice, and static asset requests are free on both.
Keeping WordPress and your domain
You have two common setups:
- Separate addresses. The public domain points to the Pages project, and WordPress moves to its own address, for example
wp.example.com. It is simple, but anything that has to reach WordPress — comments, forms, the cart — goes to that second address. - One domain with a router. A Cloudflare Worker on your domain serves the static pages and sends
/wp-admin,/wp-json, form posts and pages that are not in the static build to WordPress. Pinery Static Pro includes this router. Your domain’s DNS must be on Cloudflare to use it.
Setup walkthrough
- Create a free Cloudflare account and note your account ID.
- Create an API token with
Account › Cloudflare Pages › Edit. - In WordPress, install Pinery Static, enter the account ID, token and a project name, and run the connection test.
- Export and deploy; the site appears at
your-project.pages.dev. - In the Cloudflare dashboard, open the Pages project → Custom domains and add your domain — or set up the Pro Worker router to keep the same domain as WordPress.
The step-by-step version, including what to test before you switch, is in how to make a WordPress site static.
Frequently asked questions
Is hosting WordPress on Cloudflare Pages really free?
The static site is: requests to static assets are free and unlimited on every plan, within the file-count and file-size limits. You still pay for the hosting where WordPress itself runs.
Does the router Worker cost money?
It runs on Cloudflare Workers, and every request through it counts. The Workers free plan includes 100,000 requests a day; busier sites need Workers Paid, which starts at $5 a month per account with 10 million requests included.
Can I use Git deployments with WordPress?
Only by committing the exported files to a repository first. Direct Upload through the API skips that step, which is why Pinery Static uses it.
What if my site has more than 20,000 files?
Reduce the file count — unused image sizes are the usual culprit — or upgrade to a paid Cloudflare plan, which allows 100,000 files per site.