How to Deactivate and activate bench site

How to deactivate and activate sites temporarily (just like in frappe.cloud) using a bench command.

1 Like

in site_config.json of the site set,

{
 ...
 "maintenance_mode": 1,
 "pause_scheduler": 1,
 ...
}
2 Likes

try this:

bench --site [your.site.here] set-maintenance-mode on

I use it to stop sites that I need to work on all the time. If you do not have multiple multi-tenant sites then the command would look like this:

bench set-maintenance-mode on

(Likewise change β€œon” to β€œoff” to reactivate the site)

BKM

4 Likes