npx wrangler pages project create my-site --production-branch main

Category: Cloudflare

npx wrangler pages project create my-site --production-branch main

Create a Pages project with a production branch

Sets which branch counts as production, so deployments from main update the live site while other branches get preview URLs. If you use git flow with a main branch, pass this explicitly; the default may surprise you. Preview URLs make every PR testable before merge.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.