HostlessWP
Get started

Move your site, step by step

The setup is guided and explains every step before it takes it. It deploys a copy to a test address first, so your current site keeps running until you decide to switch.

Before you start

Moving a site for the first time? What moves, what stays and how to roll back.

A Cloudflare account

The Free plan runs a site in our tests. Its daily limits are 100,000 requests, 100,000 database queries and 1,000 page cache writes; Workers Paid ($5/month) raises them for busier sites.

MySQL with SSL

Hyperdrive only connects over SSL. The setup checks it and explains how to turn it on. The database stays where it is.

An S3-compatible bucket

For your media library, with an access key that can read and write it. On Cloudflare R2: R2 › Create bucket, then Manage API tokens › Object Read & Write on that bucket.

Node.js 20+ next to your site

On the machine that has your site's files and can reach its database, usually the server itself over SSH. Node 24 or newer also precompiles PHP for faster cold starts.

Steps

  1. Check your site

    Go to the folder with wp-config.php and run the read-only report. It lists your plugins against the tested list and anything that will not work. It changes nothing.

    cd /var/www/html
    npx hostlesswp check
  2. Run the guided setup

    It logs in to Cloudflare through Wrangler (a browser opens), asks how Cloudflare should reach your database, locates the database to place the Worker next to it, checks your bucket, packages the site and deploys it.

    npx hostlesswp
  3. Try the test address

    Open the *.workers.dev address it prints. Log in with your usual account (existing logins stay valid) and click around: pages, the admin, your forms, your shop.

  4. Switch your domain

    When you are happy, add your domain to the Worker in the Cloudflare dashboard: Workers › your Worker › Settings › Domains & Routes. Until then your current host keeps serving it.

After the move

Writing and selling

Posts, pages, comments, media, orders and settings change in the admin on Workers, as before. They are stored in your database and bucket.

Changing code

Install or update plugins, themes and WordPress on the source site, then run npx hostlesswp deploy. It asks nothing again.

Going back

Point your domain back to your old host. The database never moved; media uploaded on Workers is in your bucket.

Your answers are saved in hostlesswp-config.php next to wp-config.php. It contains passwords and keys, is created with permissions 0600, shows nothing if requested over the web, and is never uploaded. Do not commit it to version control.

Database access: public or tunnel

Over the internet

For managed databases such as Amazon RDS, Aliyun RDS or DigitalOcean. The database must accept remote connections with SSL from Cloudflare, and the user must be allowed from remote hosts.

Through a Cloudflare Tunnel

Keeps the database private. hostlesswp creates the tunnel and starts its connector on your server. Keep it running under systemd or pm2 in production.

Commands and options

CommandWhat it does
npx hostlesswpGuided setup: check, connect Cloudflare and your database, deploy
npx hostlesswp checkRead-only compatibility report (--json for machine-readable output)
npx hostlesswp deployRebuild and redeploy after changing plugins, themes or WordPress
OptionMeaning
--path <dir>WordPress folder (default: current folder)
--name <worker>Worker name (default: derived from your domain)
--db-access public|tunnelHow Cloudflare reaches MySQL
--region <aws-region>|noneWhere the Worker runs (default: next to your database)
--account <id>Cloudflare account, when you have several
--db-host, --db-user, ...Override wp-config.php
--s3-endpoint, --s3-bucket, ...Media storage; keys come from HOSTLESSWP_S3_ACCESS_KEY_ID and HOSTLESSWP_S3_SECRET_ACCESS_KEY
--no-page-cacheServe every page view through PHP
--no-precompileSkip precompiling (faster deploy, slower cold starts)
--recheck-planAfter upgrading to Workers Paid, deploy with the paid settings
--yesNever prompt; use defaults and flags (CI)

The full list is in the README.

Troubleshooting

"Hyperdrive could not connect"

The database firewall must allow Cloudflare on the MySQL port, the user must be allowed from remote hosts ('user'@'%'), and SSL must be on. Or choose the tunnel.

"Missing permissions"

Run npx wrangler login, or give your API token Workers Scripts and Hyperdrive Edit permissions (for tunnels also Cloudflare Tunnel and Connectivity Directory).

The site shows "temporarily unavailable"

Run npx wrangler tail <name> and load a page to see the error. Set HOSTLESSWP_DEBUG=1 when running hostlesswp for full stack traces.

Precompile was skipped

Your Node.js cannot run PHP's WebAssembly build locally. Use Node 24 or newer; the site works either way, with slower cold starts.

A plugin does not work

Check the compatibility list, then open an issue with the plugin, its version and what you saw. Your source site is untouched, so you can keep it running while we look.