HostlessWP
WordPress on Cloudflare

Can you host WordPress on Cloudflare?

Yes, on Cloudflare Workers. Cloudflare Pages can only serve a static export of a WordPress site, because it has no PHP and no database. Workers can run the real, dynamic WordPress: HostlessWP runs PHP 8.3 compiled to WebAssembly inside a Worker and connects it to your existing MySQL through Cloudflare Hyperdrive. The 30 most-installed plugins load in our tests, 9 of them with known limits.

Three ways to put WordPress on Cloudflare

Search results usually mean one of the first two. Only the third runs WordPress itself on Cloudflare.

Pages + static exportCloudflare in front of your hostWorkers + HostlessWP
What runs on CloudflareHTML files exported from WordPressCache, CDN and firewall; WordPress stays on your serverWordPress itself: PHP, theme, plugins
Comments, forms, search, checkout, loginsNoYes, served by your serverYes
A server to patch and watchNo, but WordPress still runs somewhere to export fromYesNo
After every content changeExport againNothingNothing
Your databaseNot used by the live siteOn your serverStays where it is, reached through Hyperdrive
Typical toolsSimply Static, WP2StaticCloudflare DNS proxy, APO, the Cloudflare pluginnpx hostlesswp

Static export is a good answer for a site that never changes between exports; see static export vs dynamic WordPress. Putting Cloudflare in front of a host speeds it up but keeps the server.

Why the usual answer is "no"

The common answer, including Google's own summary for "wordpress cloudflare workers", is that WordPress cannot run on Workers because it needs a PHP and MySQL server. That is true of Workers out of the box:

  • Workers have no PHP. They run JavaScript and WebAssembly in V8 isolates.
  • There is no lasting disk. WordPress expects to write uploads, caches and sometimes code to its own folder.
  • PHP in WebAssembly cannot open sockets, so it cannot talk to MySQL by itself.
  • Each instance has 128 MB of memory and the clock does not move during CPU work, which some PHP functions rely on.

Each of these has a workaround that leaves WordPress core unmodified. That is what HostlessWP is.

How WordPress runs on Workers

PHP 8.3 as WebAssembly

The php-wasm build from WordPress Playground, with OPcache turned on and scripts precompiled at deploy time.

Your MySQL through Hyperdrive

A db.php drop-in sends every query to the Worker, which runs it through Hyperdrive over SSL or a Cloudflare Tunnel.

Media in a bucket

wp-content/uploads lives in R2, S3, B2 or MinIO. URLs stay /wp-content/uploads/....

Page cache in KV

Logged-out visitors get cached pages without starting PHP. Carts, logins and the admin are never cached.

WP-Cron on a schedule

A Cloudflare Cron Trigger runs scheduled events every 15 minutes.

Placed next to the database

WordPress runs its queries one after another, so the Worker runs in the region of your database, not near the visitor.

The full technical walkthrough →

What does not work yet

Read this before you move a site. npx hostlesswp check reports these for your own site and changes nothing.

Not supported

Known limits
  • Email through PHP mail()Use a mail plugin that sends over an HTTP API
  • Installing plugins or themes from the adminChange them on your source site and redeploy
  • Multisitehostlesswp stops before deploying
  • Redis or Memcached object cachesWordPress uses its built-in cache
  • ImagickImages are processed with GD

Works, with care

Check first
  • Backup and migration pluginsTheir local-disk exports do not persist on Workers
  • Plugins that write generated files to uploadsThey work but rebuild those files on every request
  • Very heavy plugin stacksEach instance has 128 MB of memory
  • Uploads over 32 MBDefault limit, configurable

Plugin by plugin results →

How fast is it?

Cached pages for logged-out visitors skip PHP. Pages that run PHP depend mostly on the distance to the database. PHP time per warm page, October 2026, database in US East:

SetupCore home pageWooCommerce home page
Worker near the visitor (Singapore)7.7 s19.6 s
Worker next to the database (what hostlesswp sets up)~1.2 s~3 s

Small samples; method and the full table on the benchmarks page.

What it costs

The Workers Free plan runs a small site. Its daily limits are 100,000 requests, 100,000 Hyperdrive queries and 1,000 KV writes; R2 includes 10 GB of storage. Workers Paid is $5 a month. Your database stays with whoever hosts it today.

What the free tiers cover, worked out →

Questions

Can you host WordPress on Cloudflare Pages?

Only as static files. Pages has no PHP runtime and no MySQL, so a plugin such as Simply Static has to export the site to HTML first. Comments, forms, search, carts, checkout and logins stop working. To keep WordPress dynamic on Cloudflare, run it on Workers instead.

Does WordPress run on Cloudflare Workers?

Not natively, because Workers have no PHP. With HostlessWP it does: PHP 8.3 runs as WebAssembly in the Worker, WordPress core is unmodified, and the 30 most-installed plugins load in our tests (9 of them with known limits).

Do I have to move my database to Cloudflare?

No. HostlessWP keeps your MySQL where it is and reaches it through Cloudflare Hyperdrive, over SSL or a Cloudflare Tunnel. It does not use Cloudflare D1.

Is this Cloudflare's EmDash?

No. EmDash is a new CMS from Cloudflare, written in TypeScript on Astro; moving to it means rebuilding your theme and replacing plugins. HostlessWP runs your existing WordPress unchanged. See EmDash vs WordPress on Cloudflare.

Will my current site go down while I try it?

No. hostlesswp deploys a copy to a workers.dev test address. Your current host keeps serving your domain until you add the domain to the Worker yourself.

Is it free?

HostlessWP is open source (GPL-2.0-or-later). The Cloudflare Workers Free plan runs a small site; Workers Paid is $5 a month for busier ones. You keep paying for your database where it is.

See WordPress running on Workers

The demo is a real WordPress with WooCommerce on Workers. Log in with demo / demo.