> cloudflare pages

Cloudflare Pages hosts static sites and full-stack apps (Pages Functions) on Cloudflare's edge, and wrangler drives the whole lifecycle from the terminal. Create projects, deploy built output, run Functions locally with KV/D1/R2 bindings, manage per-environment secrets, and tail production logs. These are the `wrangler pages ...` commands you actually reach for on a working project.

// cloudflare pages

10 commands

// faq

What's the difference between `wrangler pages deploy` and `wrangler deploy`?

`wrangler pages deploy` uploads a directory of built static assets (plus any `functions/` or `_worker.js`) to a Pages project. `wrangler deploy` publishes a standalone Worker script. Use Pages for a site with optional Functions; use the Workers deploy for a pure Worker.

How do I ship a preview instead of production?

Deploy to any branch other than the project's production branch: `--branch <name>`. Non-production branches get a unique `*.pages.dev` preview URL with their own preview-environment secrets; only the production branch updates your live domain. It's the branch name, not a separate flag, that decides prod vs preview.

Why can't I read a secret back after setting it?

Pages secrets are write-only. `secret put` encrypts the value at rest, and `secret list` shows only the names. To change one, put a new value over it — there's no command to reveal the current secret.