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-name
Set the Database name for new site--db-password
Set the Database password for new site--db-type
Select the Database Type for new site, options being "postgres" or "mariadb". Default is "mariadb"--db-host
Set Database Host for new site--db-port
Set Database Port for new site--db-root-username
Specify Root username for MariaDB or Postgres--db-root-password
Specify Root password for MariaDB or Postgres--admin-password
Specify the Administrator password for new site--source_sql
Initiate database with a SQL file--install-app
Install app after installation
Flags
--no-mariadb-socket
Set MariaDB host to % and use TCP/IP Socket instead of using the UNIX Socket--verbose
Add Verbosity--force
Force 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 postgres
Create 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}