bench new-site
Usage
bench new-site [OPTIONS] SITE
Description
Create a new Frappe site. This operation creates a new folder under ./sites
which will contain all the site information for the site and also creates a new
database in your DBMS with all of Frappe's Modules and DocTypes installed.
The site config, which can be found under ./sites/{site}/site_config.json
maintains information about the site's state. For more information about it,
checkout this guide.
Options
--db-nameSet the Database name for new site--db-passwordSet the Database password for new site--db-typeSelect the Database Type for new site, options being "postgres" or "mariadb". Default is "mariadb"--db-hostSet Database Host for new site--db-portSet Database Port for new site--db-root-usernameSpecify Root username for MariaDB or Postgres--db-root-passwordSpecify Root password for MariaDB or Postgres--admin-passwordSpecify the Administrator password for new site--source_sqlInitiate database with a SQL file--install-appInstall app after installation
Flags
--no-mariadb-socketSet MariaDB host to % and use TCP/IP Socket instead of using the UNIX Socket--verboseAdd Verbosity--forceForce restore if the site or a database with the same name already exists
Examples
Create a new site.
bench new-site {site}Create a new PostgreSQL site.
bench new-site {site} --db-type postgresCreate a new site while skipping the interactive prompts for
- Submitting the Site's Administrator Password
- Submitting the MariaDB Root Password
bench new-site {site} --admin-password {admin-password} --db-root-password {mariadb-password}
Create a new site with non-default and autogenerated values.
bench new-site {site} --db-type {type} --db-name {name} --db-password {pass} --db-host {host} --db-port {port}Create a new site with a MariaDB non-root user with database creation priveledges.
bench new-site {site} --db-root-username {user} --db-root-password {pass}Create a new site with an app (available on current bench) installed.
bench new-site {site} --install-app {app}