Usage and General Commands
This section covers general usage and commands for n98-magerun2.
Running Commands
You can run n98-magerun2 commands in two ways:
- Directly execute the PHAR file (if it has the executable flag set):
./n98-magerun2.phar list
If you get a permission error, set the executable flag:
chmod +x n98-magerun2.phar
- Run the PHAR file via PHP:
php n98-magerun2.phar list
To get help for a specific command:
php n98-magerun2.phar <command> --help
Common Options
--root-dir
: Specify Magento root directory--help
: Show help for a command--version
: Show version information
Example
php n98-magerun2.phar cache:clean
See the command reference for more details on each command.