base44 site deploy
Deploy built site files to Base44 hosting.
Table of Contents
- Syntax
- Authentication
- Prerequisites
- How It Works
- Interactive Flow
- Typical Workflow
- Configuration
- Error Handling
- Use Cases
- Notes
Syntax
npx base44 site deploy [options]Options
| Option | Description |
|---|---|
-y, --yes |
Skip confirmation prompt |
Use -y flag for non-interactive/automated deployments:
npx base44 site deploy -yAuthentication
Required: Yes. If not authenticated, you'll be prompted to login first.
Prerequisites
- Must be run from a Base44 project directory
- Project must have
site.outputDirectoryconfigured in project config - Site must be built before deploying (run your build command first)
- SPA only: Base44 hosting supports Single Page Applications with a single
index.htmlentry point. All routes are served fromindex.html(client-side routing).
How It Works
- Reads project configuration
- Validates that site configuration exists
- Prompts for deployment confirmation showing the output directory
- Creates an archive of site files from the output directory
- Deploys to Base44 hosting
- Returns the app URL
Interactive Flow
$ npx base44 site deploy
Deploy site from ./dist? (yes/no) yes
Creating archive...
Uploading to Base44...
Deploying...
✓ Deployment successful!
Visit your site at: https://my-app.base44.appTypical Workflow
# 1. Build your site using your framework's build command
npm run build
# 2. Deploy to Base44
npx base44 site deployConfiguration
The site.outputDirectory in your project configuration should point to where your framework outputs built files:
- Vite: typically
./dist - Next.js: typically
./.nextor./out - Create React App: typically
./build - Custom: whatever your build tool outputs to
Error Handling
If site configuration is missing:
$ npx base44 site deploy
Error: No site configuration found in projectIf you cancel the deployment:
Deploy site from ./dist? (yes/no) no
Deployment cancelledUse Cases
- Deploy your site after making changes
- Push new versions of your application
- Deploy after updating content or functionality
- Part of your CI/CD pipeline
Notes
- Always build your site before deploying
- The command deploys whatever is in your output directory
- Make sure your build completed successfully before deploying
- Previous deployments are preserved (versioned) in Base44
- Deployment is immediate and updates your live site