dev:keep-calm
Keep Calm and Run All the Things ๐ ๏ธ๐โ
Don't panic! Run all the magic commands to (maybe) fix your broken shop and restore your sanity!
Command is experimental and not intended for production use. Use with caution!
The dev:keep-calm command runs a sequence of common Magento 2 maintenance and development commands in a single step. This helps you quickly restore your development environment after code changes or when things go wrong.
What It Doesโ
Run the following commands in order (unless skipped or not needed):
hyva:config:generate(only ifapp/etc/hyva-themes.jsondoes not exist)setup:upgrade(also clears cache)db:add-default-authorization-entriesgeneration:flush(clears generated code)setup:di:compile(compiles dependency injection)dev:asset:clear(clears static assets)dev:theme:build-hyva(builds the CSS for all installed Hyvรค themes)setup:static-content:deploy(skipped in non-production mode unless--force-static-content-deployis used)indexer:resetindexer:reindexmaintenance:disable
Each command can be skipped with a --skip-<command> option, e.g. --skip-setup-upgrade.
At the end, a summary checklist is printed showing which commands were executed, skipped, or failed.
Usageโ
n98-magerun2.phar dev:keep-calm [--force-static-content-deploy] [--skip-setup-upgrade] [--skip-indexer-reindex] ...
Optionsโ
--force-static-content-deployโ Forces static content deploy even in non-production mode.--skip-<command>โ Skips the specified command (replace<command>with the command name, e.g.setup-upgrade).
Example if you want to skip the indexer:reset and indexer:reindex commands:
n98-magerun2.phar dev:keep-calm --skip-indexer-reset --skip-indexer-reindex
Example Outputโ
1. ๐ Running command: hyva:config:generate
๐ Skipping command: hyva:config:generate (app/etc/hyva-themes.json exists)
2. ๐ Running command: setup:upgrade
... (output of each command)
Command Execution Summary:
1. โญ๏ธ hyva:config:generate - Generate Hyvรค theme configuration files if they are missing. (app/etc/hyva-themes.json exists)
2. โ
setup:upgrade - Run setup upgrade and database schema/data updates. Clears also the cache.
...
Notesโ
- The command is intended for development environments only.
- The summary at the end helps you quickly see what was done and what was skipped.
See Alsoโ
This command was introduced with version 9.0.0.