-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Quick Reference Guide
-
bench --version- Show bench version -
bench version- Show version of all apps -
bench src- Show bench repo directory -
bench --help- Show all commands and help -
bench [command] --help- Show help for command -
bench init [bench-name]- Create a new bench (Run from home dir)-
--python TEXTPath to Python Executable. -
--ignore-existIgnore if Bench instance exists. -
--apps_path TEXTpath to json files with apps to install after init -
--frappe-path TEXTpath to frappe repo -
--frappe-branch TEXTpath to frappe repo -
--clone-from TEXTcopy repos from path -
--clone-without-updatecopy repos from path without update -
--no-procfilePull changes in all the apps in bench -
--no-backupsRun migrations for all sites in the bench -
--no-auto-updateBuild JS and CSS artifacts for the bench -
--skip-redis-config-generationSkip redis config generation if already specifying the common-site-config file -
--verboseVerbose output during install
-
-
bench --site [site-name] COMMAND- Specify site for command -
bench update- Pulls changes for bench-repo and all apps, applies patches, builds JS and CSS, and then migrates.-
--pullPull changes in all the apps in bench -
--patchRun migrations for all sites in the bench -
--buildBuild JS and CSS artifacts for the bench -
--benchUpdate bench -
--requirementsUpdate requirements -
--restart-supervisorrestart supervisor processes after update -
--no-backupDon't take a backup before update
-
-
bench restartRestart all bench services -
bench backupCreate a backup of the default site.Backup will be saved to
~/frappe-bench/sites/{your site}/private/backups/. -
bench backup-all-sitesBackup all sites-
--with-filesBackup site with files
-
-
bench restoreRestore-
--with-private-filesRestore site with private files (Path to tar file) -
--with-public-filesRestore site with public files (Path to tar file)
-
-
bench migrateRun patches, sync schema and rebuild files/translations-
--rebuild-website TEXTRebuild webpages after migration
-
-
bench migrate-env [python-version]Will migrate the virtual environment to the desired python version -
bench --site [sitename] set-admin-password [password]Will reset the administrator password -
bench destroy-all-sessionsDestroys all sessions
-
bench config- Change bench configuration-
auto_update [on/off]Enable/Disable auto update for bench -
dns_multitenant [on/off]Enable/Disable DNS Multitenancy -
http_timeoutSet http timeout -
restart_supervisor_on_updateEnable/Disable auto restart of supervisor -
serve_default_siteConfigure nginx to serve the default site on -
update_bench_on_updateEnable/Disable bench updates on running bench...
-
-
bench setup- Setup components-
auto-updateAdd cronjob for bench auto update -
backupsAdd cronjob for bench backups -
configoverwrite or make config.json -
envSetup virtualenv for bench -
nginxgenerate config for nginx -
procfileSetup Procfile for bench start -
productionsetup bench for production -
redisgenerate config for redis cache -
socketioSetup node deps for socketio server -
sudoersAdd commands to sudoers list for execution... -
supervisorgenerate config for supervisor -
add-domainadd custom domain for site -
firewallsetup firewall and block all ports except 22, 80 and 443 -
ssh-portchange the default ssh connection port -
requirementsUpdate Python and Node packages-
--nodeUpdate only Node packages -
--pythonUpdate only Python packages
-
-
-
bench set-nginx-port [sitename] [port]- Set site's port in Production
-
bench new-app [app-name]Creates a new app -
bench get-app [repo-link]- Downloads an app from a git repository and installs it-
--branch [branch-name]Fetches specific branch of app
-
-
bench install-app [app-name]Installs existing app -
bench remove-from-installed-apps [app-name]Remove app from the list of apps -
bench uninstall-app [app-name]Delete app and everything linked to the app (Bench needs to be running) -
bench remove-app [app-name]Remove app from the bench entirely -
bench --site [sitename] --force reinstallReinstall with fresh database (Caution: Will wipe out old database) -
bench new-site [sitename]- Creates a new site-
--db-nameDatabase name -
--db-hostCustom database host URL for remote connection -
--db-portCustom database listening port (eg. port other than the default 3306) -
--mariadb-root-usernameRoot username for MariaDB -
--mariadb-root-passwordRoot password for MariaDB -
--admin-passwordAdministrator password for new site -
--verboseVerbose -
--forceForce restore if site/database already exists -
--source_sqlInitiate database with a SQL file -
--install-appInstall app after installation`
-
-
bench use [site]Sets a default site -
bench drop-siteRemoves site from disk and database completely--root-login--root-password
-
bench set-config [key] [value]Adds a key-value pair to site's config file -
bench consoleOpens a IPython console in the bench venv -
bench executeExecute a method inside any app.- Eg :
bench execute frappe.utils.scheduler.enqueue_scheduler_events
- Eg :
-
bench --site [sitename] mariadbOpens SQL Console -
bench --site [sitename] export-fixturesExports fixtures -
bench run-testsRun tests-
--appApp Name -
--doctypeDocType to run tests for -
--testSpecific Test -
--moduleRun a particular module that has tests -
--profileRuns a Python profiler on the test
-
-
bench disable-productionDisables production environment
-
bench enable-scheduler- Enables Scheduler that will run scheduled tasks -
bench doctor- Get diagnostic info about background workers -
bench show-pending-jobs- Get pending jobs -
bench purge-jobs- Destroy all pending jobs
Custom Footer Page