Site commands allow you to create, manage, and maintain Frappe sites within your bench.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/frappe/frappe/llms.txt
Use this file to discover all available pages before exploring further.
Create a new site
Create a new Frappe site.--db-name- Database name (defaults to site name with underscores)--db-password- Database password--db-type- Database type:mariadb,postgres, orsqlite(default:mariadb)--db-host- Database host--db-port- Database port--db-root-username- Root username (default:root)--db-root-password- Root password for database--db-socket- Database socket path--admin-password- Administrator password--install-app- Install app(s) after site creation (can be used multiple times)--source-sql- Initialize database from SQL file--set-default- Set as default site--force- Force creation even if site exists--verbose- Verbose output
Drop a site
Remove a site from the database and filesystem.--db-root-username- Root username for database--db-root-password- Root password for database--archived-sites-path- Custom path for archived sites--no-backup- Skip backup before dropping--force- Force drop even if errors occur
Reinstall site
Wipe all data and reinstall a site.--admin-password- Administrator password for reinstalled site--db-root-username- Root username--db-root-password- Root password--yes- Skip confirmation prompt
Set default site
Set a site as the default site for the bench.Install app
Install one or more apps to a site.--force- Force install even if incompatible
Uninstall app
Remove an app and all its modules from a site.--yes, -y- Skip confirmation prompt--dry-run- List all doctypes that will be deleted--no-backup- Skip site backup--force- Force uninstall
List installed apps
List all apps installed on a site.-f, --format- Output format:textorjson(default:text)
Migrate site
Run patches, sync schema, and rebuild files/translations.--skip-failing- Skip patches that fail--skip-search-index- Skip search indexing--skip-fixtures- Skip loading fixtures
Browse site
Open a site in your web browser.--user- Login as specific user (requires developer mode)--session-end- Session end time (ISO8601 format)--user-for-audit- User to mention in audit trail
Add to hosts
Add site to /etc/hosts file.User management
Add system manager
Add a new system manager to a site.--first-name- User’s first name--last-name- User’s last name--password- User password--send-welcome-email- Send welcome email
Add user
Add a new user to a site.--first-name- User’s first name--last-name- User’s last name--password- User password--user-type- User type (e.g., “System User”, “Website User”)--add-role- Add role(s) to user (can be used multiple times)--send-welcome-email- Send welcome email
Disable user
Disable a user account.Set password
Set or change a user’s password.--logout-all-sessions- Log out user from all sessions
Set admin password
Set the Administrator password.--logout-all-sessions- Log out from all sessions
Session management
Destroy all user sessions (logs everyone out).--reason- Reason for destroying sessions
Publish realtime events
Publish a realtime event from the command line.--message- Event message--room- Room name--user- User to send to--doctype- DocType context--docname- Document name context--after-commit- Publish after commit
Recorder
Control the Frappe Recorder for debugging.Start recording
Stop recording
Ngrok tunnel
Start an ngrok tunnel to your development site.--bind-tls- Return HTTPS tunnel reference--use-default-authtoken- Use authtoken from ngrok config
ngrok_authtoken to your site_config.json first.
Advanced commands
Reload doctype
Reload schema for a specific DocType.Run patch
Run a specific migration patch.--force- Force run even if already executed
Bypass patch
Bypass a patch permanently without running it.--yes, -y- Skip confirmation