Direct Upload · Cloudflare Pages docsSkip to contentDocumentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/pages/llms.txt
Use this file to discover all available pages before exploring further.
DocsDirectoryAPISDKsChangelog
SearchCtrlK
Log inDashboard
Pages
/
Overview
Getting started
Overview
C3 CLI
Direct Upload
Git integration
Framework guides
Next.js
Overview
Static site
Analog
Angular
Astro
Blazor
Brunch
Docusaurus
Elder.js
Eleventy
Ember
Gatsby
Gridsome
Hexo
Hono
Hugo
Jekyll
MkDocs
Nuxt
Pelican
Preact
Qwik
React
Remix
SolidStart
Sphinx
Static HTML
SvelteKit
VitePress
Vue
Zola
Configuration
Branch deployment controls
Build caching
Build configuration
Build image
Build watch paths
Custom domains
Debugging Pages
Deploy Hooks
Early Hints
Git integration
Overview
GitHub integration
GitLab integration
Troubleshooting builds
Headers
Monorepos
Preview deployments
Redirects
REST API
Rollbacks
Serving Pages
Functions
Overview
Get started
Routing
API reference
Examples
A/B testing with middleware
Adding CORS headers
Middleware
Configuration
Local development
Bindings
TypeScript
Advanced mode
Pages Plugins
Overview
Cloudflare Access
Google Chat
GraphQL
hCaptcha
Honeycomb
Sentry
Static Forms
Stytch
Turnstile
Community Plugins
vercel/og
Metrics
Debugging and logging
Pricing
Module support
Smart PlacementBeta
Source maps and stack traces
Tutorials
Demos and architectures
How to
Add a custom domain to a branch
Add custom HTTP headers
Deploy a static WordPress site
Enable Web Analytics
Enable Zaraz
Install private packages
Preview Local Projects with Cloudflare Tunnel
Redirecting *.pages.dev to a Custom Domain
Redirecting www to domain apex
Set build commands per branch
Use Direct Upload with continuous integration
Use Pages Functions for A/B testing
Platform
Limits
Choose a data or storage product ↗︎
Changelog
Known issues
Migrate to Workers ↗︎
Agent resources
Agent setup ↗︎
Cloudflare Skills ↗︎
Code Mode MCP Server ↗︎
Domain-specific MCP Servers ↗︎MCP
Pages llms.txt ↗︎
Pages llms-full.txt ↗︎
Cloudflare Docs llms.txt ↗︎
Cloudflare Docs llms-full.txt ↗︎
Home
/Pages
/Getting started
/Direct Upload
Direct Upload
Last updated Apr 21, 2026|Copy as Markdown|View as Markdown|Agent setup
OverviewPrerequisitesUpload methodsSupported file typesWrangler CLI Set up WranglerDrag and dropTroubleshoot Limits Production branch configuration Functions
Direct Upload enables you to upload your prebuilt assets to Pages and deploy them to the Cloudflare global network. You should choose Direct Upload over Git integration if you want to integrate your own build platform or upload from your local computer.
This guide will instruct you how to upload your assets using Wrangler or the drag and drop method.
You cannot switch to Git integration later
If you choose Direct Upload, you cannot switch to Git integration later. You will have to create a new project with Git integration to use automatic deployments.
Prerequisites
Before you deploy your project with Direct Upload, run the appropriate build command to build your project.
Upload methods
After you have your prebuilt assets ready, there are two ways to begin uploading:
Wrangler.
Drag and drop.
Note
Within a Direct Upload project, you can switch between creating deployments with either Wrangler or drag and drop. For existing Git-integrated projects, you can manually create deployments using wrangler deploy. However, you cannot use drag and drop on the dashboard with existing Git-integrated projects.
Supported file types
Below is the supported file types for each Direct Upload options:
Wrangler: A single folder of assets. (Zip files are not supported.)
Drag and drop: A zip file or single folder of assets.
Wrangler CLI
Set up Wrangler
To begin, install npm ↗︎. Then install Wrangler, the Developer Platform CLI.
Create your project
Log in to Wrangler with the wrangler login command. Then run the pages project create command:
npx wrangler pages project create
You will then be prompted to specify the project name. Your project will be served at <PROJECT_NAME>.pages.dev (or your project name plus a few random characters if your project name is already taken). You will also be prompted to specify your production branch.
Subsequent deployments will reuse both of these values (saved in your node_modules/.cache/wrangler folder).
Deploy your assets
From here, you have created an empty project and can now deploy your assets for your first deployment and for all subsequent deployments in your production environment. To do this, run the wrangler pages deploy command:
npx wrangler pages deploy <BUILD_OUTPUT_DIRECTORY>
Find the appropriate build output directory for your project in Build directory under Framework presets.
Your production deployment will be available at <PROJECT_NAME>.pages.dev.
Note
Before using the wrangler pages deploy command, you will need to make sure you are inside the project. If not, you can also pass in the project path.
To deploy assets to a preview environment, run:
npx wrangler pages deploy <OUTPUT_DIRECTORY> --branch=<BRANCH_NAME>
For every branch you create, a branch alias will be available to you at <BRANCH_NAME>.<PROJECT_NAME>.pages.dev.
Note
If you are in a Git workspace, Wrangler will automatically pull the branch information for you. Otherwise, you will need to specify your branch in this command.
If you would like to streamline the project creation and asset deployment steps, you can also use the deploy command to both create and deploy assets at the same time. If you execute this command first, you will still be prompted to specify your project name and production branch. These values will still be cached for subsequent deployments as stated above. If the cache already exists and you would like to create a new project, you will need to run the create command.
Other useful commands
If you would like to use Wrangler to obtain a list of all available projects for Direct Upload, use pages project list:
npx wrangler pages project list
To get the output as JSON for programmatic use or scripting, use the --json flag:
npx wrangler pages project list --json
If you would like to use Wrangler to obtain a list of all unique preview URLs for a particular project, use pages deployment list:
npx wrangler pages deployment list
For step-by-step directions on how to use Wrangler and continuous integration tools like GitHub Actions, Circle CI, and Travis CI together for continuous deployment, refer to Use Direct Upload with continuous integration.
Drag and drop
Deploy your project with drag and drop
To deploy with drag and drop:
In the Cloudflare dashboard, go to the Workers & Pages page.
Go to Workers & Pages ↗
Select Create application > Get started > Drag and drop your files.
Enter your project name in the provided field and drag and drop your assets.
Select Deploy site.
Your project will be served from <PROJECT_NAME>.pages.dev. Next drag and drop your build output directory into the uploading frame. Once your files have been successfully uploaded, select Save and Deploy and continue to your newly deployed project.
Create a new deployment
After you have your project created, select Create a new deployment to begin a new version of your site. Next, choose whether your new deployment will be made to your production or preview environment. If choosing preview, you can create a new deployment branch or enter an existing one.
Troubleshoot
Limits
Upload method
File limit
File size
Wrangler
20,000 files
25 MiB
Drag and drop
1,000 files
25 MiB
If using the drag and drop method, a red warning symbol will appear next to an asset if too large and thus unsuccessfully uploaded. In this case, you may choose to delete that asset but you cannot replace it. In order to do so, you must reupload the entire project.
Production branch configuration
If your project is a Direct Upload project, you will not have the option to configure production branch controls. To update your production branch, you will need to manually call the Update Project endpoint in the API.
curl --request PATCH \
"https://api.cloudflare.com/client/v4/accounts/{account_id}/pages/projects/{project_name}" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data "{\"production_branch\": \"main\"}"
Functions
Drag and drop deployments made from the Cloudflare dashboard do not currently support compiling a functions folder of Pages Functions. To deploy a functions folder, you must use Wrangler. When deploying a project using Wrangler, if a functions folder exists where the command is run, that functions folder will be uploaded with the project.
However, note that a _worker.js file is supported by both Wrangler and drag and drop deployments made from the dashboard.
PreviousC3 CLINextGit integration
Was this helpful?
YesNo
Edit pageReport issue
On this page
Overview
Prerequisites
Upload methods
Supported file types
Wrangler CLI
Set up Wrangler
Drag and drop
Troubleshoot
Limits
Production branch configuration
Functions
Edit pageReport issue
Getting started
PlansContact salesPartnersFind a partnerStartupsUnder attack?Domain name search
Company
AboutCareersInvestorsPressPress kitGlobal network
Public interest
Project GalileoAthenian ProjectCloudflare for CampaignsProject FairshotImpact/ESG
Compliance
Compliance resourcesTrust HubData ProtectionResponsible AITransparency reportReport abuse
Resources
App innovation reportCloudflare RadarCase studiesStatusSupportEventsBlog
Developers
DocumentationLearning centerCommunity
Solutions
SSE and SASE platformCloudflare AI CloudAI SecurityFrontend Development PlatformMulti-Tenant Platform DevelopmentWeb Security Platform
Start BuildingLog In
© 2026 Cloudflare, Inc.
Privacy policy| Report security issues| Terms of use| Trademark
|
Your privacy choices
Docs