venveo / craft-maintenancemode
Programmatically disable the website through command line
Installs: 759
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 2
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2022-02-01 13:11:19 UTC
README
Programmatically disable the website through command line. Use this for your automated build processes to disable the website during build!
Installation
Maintenance mode can be enabled through composer:
composer require venveo/craft-maintenancemode
Usage
To enable maintenance mode:
./craft maintenancemode/maintenance-mode/enable
To disable maintenance mode:
./craft maintenancemode/maintenance-mode/disable
Example Scenario
Using Laravel Forge to deploy your Craft app, you might want to disable the website during the frontend build process:
cd /home/forge/mysite.com php craft maintenance-mode/maintenance-mode/enable git pull origin master --recurse-submodules git submodule init git submodule update --remote --recursive composer install --no-interaction --prefer-dist --optimize-autoloader echo "" | sudo -S service php7.0-fpm reload if [ -f artisan ] then php artisan migrate --force fi yarn install npm run production php craft maintenance-mode/maintenance-mode/disable
Brought to you by Venveo