common_site_config.json file.
set-common-config
Set one or more configuration values in the common site config.Options
Key-value pair to set in the configuration. Can be specified multiple times.
Value Type Handling
The command automatically handles type conversion:- Booleans: Use
trueorfalse(case-insensitive) - Numbers: Integers and floats are automatically detected
- Lists/Dicts: Use Python literal syntax
- Strings: Any other value is treated as a string
Examples
Set Database Configuration
Enable Developer Mode
Set Multiple Values
Set Complex Values
Implementation Details
Location:bench/commands/config.py:58
The command uses Python’s ast.literal_eval() to safely parse values, allowing you to set complex data structures while preventing code injection.
remove-common-config
Remove one or more keys from the common site config.Arguments
One or more configuration keys to remove from common_site_config.json
Examples
Remove Single Key
Remove Multiple Keys
Clean Up Test Configuration
Implementation Details
Location:bench/commands/config.py:77
The command loads the current configuration, removes the specified keys if they exist, and writes the updated configuration back to disk.
Common Configuration Keys
Here are some commonly used configuration keys:Database Settings
Database Settings
db_host- Database server hostnamedb_port- Database server portdb_name- Default database namedb_password- Database password
Mail Settings
Mail Settings
mail_server- SMTP server hostnamemail_port- SMTP server portmail_login- SMTP usernamemail_password- SMTP passwordauto_email_id- Default sender email
Development Settings
Development Settings
developer_mode- Enable developer mode (true/false)disable_website_cache- Disable website cachingserver_script_enabled- Enable server scripts
Performance Settings
Performance Settings
background_workers- Number of background workerssocketio_port- Socket.IO portwebserver_port- Web server port
Notes
Changes take effect immediately but may require restarting bench services to apply fully: