Skip to content

Suggestion: Add built-in support for static site hosting in Wrangler #15535

Description

@fbwe425

Description

Currently, hosting static sites on Cloudflare Workers requires either:

  1. Using Cloudflare Pages (separate service)
  2. Manual configuration with Workers Sites

It would be convenient to have a simpler way to deploy static sites directly from Wrangler.

Proposed Solution

wrangler deploy --static ./dist

This could automatically:

  • Upload files to KV or R2
  • Generate a worker script to serve the files
  • Configure caching headers
  • Set up proper routing

Benefits

  • Simplified workflow for static sites
  • Unified CLI experience
  • Better integration with existing build tools
  • Lower barrier to entry for new users

Use Case

Many developers build static sites with tools like Vite, Astro, or plain HTML/CSS. Having a one-command deployment would be very helpful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:workers-assetsRelating to Cloudflare Workers Assets: https://developers.cloudflare.com/workers/static-assets/package:wranglerRelating to the `wrangler` package

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions