Search code examples
shopwareshopware6

How to enable maintenance mode via console in Shopware 6


i would like to set my Shopware 6 instance to maintenance mode using my update script. Is there any way to enable the maintenance mode using the bin/console?


Solution

  • You can enable the maintenance mode for a specific sales channel with

    bin/console sales-channel:maintenance:enable salesChannelId
    

    Or you can enable it for all sales channels with the --all flag

    bin/console sales-channel:maintenance:enable --all
    

    Works the same for disabling.