wrangler pages command provides tools for deploying and managing Cloudflare Pages projects.
pages deploy
Deploy a directory of static assets as a Pages deployment.The directory of static files to upload
Options
The name of the project you want to deploy to
The name of the branch you want to deploy to
The SHA to attach to this deployment
The commit message to attach to this deployment
Whether or not the workspace should be considered dirty for this deployment
Skip asset caching which speeds up builds
Whether to run bundling on
_worker.js before deployingWhether to upload any server-side sourcemaps with this deployment
Example
pages dev
Develop your full-stack Pages application locally.The directory of static assets to serve
The proxy command to run (deprecated)
Options
The port to listen on (serve from)
The IP address to listen on
Port for devtools to connect to
Date to use for compatibility checks
Flags to use for compatibility checks
Whether to run bundling on
_worker.jsAuto reload HTML pages when change is detected
Protocol to listen to requests on, defaults to http
Path to a custom certificate key
Path to a custom certificate
Specify directory to use for local persistence (defaults to .wrangler/state)
Specify logging level
Show interactive dev session (defaults to true if the terminal supports interactivity)
Binding Options
Bind variable/secret (KEY=VALUE)
KV namespace to bind (—kv KV_BINDING)
D1 database to bind (—d1 D1_BINDING)
Durable Object to bind (—do DO_BINDING=CLASS_NAME@SCRIPT_NAME)
R2 bucket to bind (—r2 R2_BINDING)
AI to bind (—ai AI_BINDING)
Service to bind (—service SERVICE=SCRIPT_NAME)
Example
pages project
Interact with your Pages projects.pages project list
List your Cloudflare Pages projects.Return output as clean JSON
pages project create
Create a new Cloudflare Pages project.The name of your Pages project
The name of the production branch of your project
Date to use for compatibility checks
Flags to use for compatibility checks
pages project delete
Delete a Cloudflare Pages project.The name of your Pages project
Answer “yes” to confirm project deletion
Example
pages deployment
Interact with the deployments of a project.pages deployment list
List deployments in your Cloudflare Pages project.The name of the project you would like to list deployments for
Environment type to list deployments for
Return output as clean JSON
pages deployment delete
Delete a deployment in your Cloudflare Pages project.The ID of the deployment to delete
The name of the project the deployment belongs to
Skip confirmation
pages deployment tail
Start a tail session for a deployment.The name of the project
ID of the deployment to tail
Environment to tail (production or preview)
Example
pages secret
Generate a secret that can be referenced in a Pages project.pages secret put
Create or update a secret variable for a Pages project.The variable name to be accessible in the Pages project
The name of your Pages project
Environment to add the secret to
pages secret bulk
Bulk upload secrets for a Pages project.The file of key-value pairs to upload, as JSON or .env file. If omitted, Wrangler expects input from stdin
The name of your Pages project
Environment to add the secrets to
pages secret delete
Delete a secret from a Pages project.The name of the secret to delete
The name of your Pages project
Environment to delete the secret from
pages secret list
List all secrets for a Pages project.The name of your Pages project
Environment to list secrets for
Example
pages download
Download settings from your project.pages download config
Download configuration from your Pages project.The name of your Pages project
Output directory for the downloaded configuration