Magento 2 is new version of Magento with new structure, design and some functionality improve and include for creating a fully customized store. for any developer who works on Magento 2 than much familiar with Magento command line arguments. For use Magento CLI in any operating system need some system requirements for Magento check all configuration Here.
Magento has one command-line interface that performs both installation and configuration tasks. So you can install Magento using command line. Here below table summarizes the available commands in Magento 2. from that some are most used when you develop websites in Magento 2.
Every command run in bin directory of your Magento installation. so first navigate to that directory than use below commands.
When you run want to run command from Magento root directory than write command as `php bin/magento COMMAND`. You can also create own command to run in CLI.
Magento has one command-line interface that performs both installation and configuration tasks. So you can install Magento using command line. Here below table summarizes the available commands in Magento 2. from that some are most used when you develop websites in Magento 2.
Every command run in bin directory of your Magento installation. so first navigate to that directory than use below commands.
When you run want to run command from Magento root directory than write command as `php bin/magento COMMAND`. You can also create own command to run in CLI.
Command | Use |
---|---|
admin
|
|
magento admin:user:create [--<parameter_name>=<value>, ...] | Create a new administrator or to edit an existing administrator |
magento admin:user:unlock [admin_user_name] | Unlock the account of an administrator that was locked |
app
|
|
magento app:config:dump | Create dump of application |
cache
|
|
magento cache:status | To view the status of the cache |
magento cache:enable [type] | Omitting [type] enables or disables all cache types at the same time |
magento cache:disable [type] | This command disable all([type]) types |
mmagento cache:clean [type] | Deletes all items from enabled Magento cache types only |
mmagento cache:flush [type] | Flushing a cache type purges the cache storage |
cron
|
|
magento cron:run [--group="<cron group name>"] | To set up(run) custom cron jobs and groups |
customer
|
|
magento customer:hash:upgrade | Upgrade customer hash according to latest algorithm.It helps to increase customer Password security |
deploy
|
|
magento deploy:mode:show | Displays current application mode |
magento deploy:mode:set {mode} | Change application mode either developer or production |
dev
|
|
magento dev:source-theme:display | Collects and publishes source files for theme |
magento dev:tests:run | Runs test(all, unit, integration, integration-all, static, static-all, integrity, legacy, default) |
magento dev:urn-catalog:generate <path> | Generates the catalog of URNs to *.xsd for IDE to highlight XML(Currently, only PHPStorm is supported) |
magento dev:xml:convert [-o|--overwrite] {xml file} {xslt stylesheet} | Update your layout XML files if you update the corresponding Extensible Style sheet Language Transformations (XSLT) style sheet. |
i18n
|
|
magento i18n:collect-phrases [-o|--output="<csv file path and name>"] [-m|--magento] <path to directory to translate> | Run the translation collection command to extract translatable words and phrases from enabled components |
magento i18n:pack [-m|--mode={merge|replace}] [-d|--allow-duplicates] <ource> <locale> | Save language package |
magento i18n:uninstall [-b|--backup-code] {language package name} ... {language package name} | Uninstall language package |
indexer
|
|
magento indexer:info | View the list of indexers |
magento indexer:status [indexer] | View the status of all or selected indexers |
magento indexer:reindex [indexer] | Re-index all or selected indexers one time only |
magento indexer:show-mode [indexer] | To view the current/all indexer configuration |
magento indexer:set-mode {realtime|schedule} [indexer] | To specify the indexer configuration |
magento indexer:reset [indexer] | To reset current/all indexer |
info
|
|
magento info:adminuri | Displays Magento admin URI |
magento info:backups:list | Prints all lists of backup files |
magento info:currency:list | Displays list of available currencies |
magento info:dependencies:show-modules [-d|--directory="
|
Show number of dependencies between module |
magento info:dependencies:show-modules-circular [-d|--directory="
|
Show number of circular dependencies between module |
magento info:dependencies:show-framework [-d|--directory="
|
Show number of dependencies on Magento framework |
magento info:language:list | Displays list of available languages |
magento info:timezone:list | Displays list of available time zones |
maintenance
|
|
magento maintenance:allow-ips <ip address> .. <ip address> [--none] | Maintain the list of exempt IP addresses |
magento maintenance:enable [--ip=<ip address> ... --ip=<ip address>] | [ip=none] | Enable maintenance mode |
magento maintenance:disable [--ip=<ip address> ... --ip=<ip address>] | [ip=none] | Disable maintenance mode |
magento maintenance:status | Displays maintenance mode status |
module
|
|
magento module:enable [-c|--clear-static-content] [-f|--force] [--all] <module-list> | Enable specified/all available modules |
magento module:disable [-c|--clear-static-content] [-f|--force] [--all] <module-list> | Disable specified/all available modules |
magento module:status | Displays status of all available modules |
magento module:uninstall [--backup-code] [--backup-media] [--backup-db] [-r|--remove-data] [-c|--clear-static-content] \ {ModuleName} ... {ModuleName} | Uninstall module\modules {ModuleName} define as <VendorName>_<ModuleName> |
sample data
|
|
magento sampledata:deploy | Deploy sample data module |
magento sampledata:remove | Remove all sample data packages from composer.json |
magento sampledata:reset | Reset all sample data modules for re-installation |
setup
|
|
magento setup:backup [--code] [--media] [--db] | Takes backup of Magento application code base, media and database |
magento setup:config:set [--<parameter>=<value>, ...] | To update the deployment configuration without affecting anything else |
magento cron:run [--group="<cron group name>"] | Runs all/specifies cron job schedule for setup application |
magento setup:db-schema:upgrade | Install and upgrade schema in DB |
magento setup:db-data:upgrade | Install and upgrade data in DB |
magento setup:db:status | Check if DB data or schema requires upgrade |
magento setup:install --<option>=<value> ... --<option><value> | Install the Magento application database schema and data with configuration |
magento setup:upgrade [--keep-generated] | Upgrade the Magento application database schema and data |
magento setup:uninstall | Uninstalling the Magento software drops and restores the database, removes the deployment configuration, and clears directories |
magento setup:di:compile | Compile code to generated code and dependency injection configuration |
magento setup:rollback [-c|--code-file="<name>"] [-m|--media-file="<name>"] [-d|--db-file="<name>"] | Rollback of Magento application code base, media and database according to backup |
magento setup:perf:generate-fixtures {path to profile} | Generate data for performance testing |
magento setup:store-config:set [--<parameter_name>=<value>, ...] | Install & configure the store with basic parameters |
magento setup:static-content:deploy [<list of languages>] [-t|--theme[="<theme>"]] [--exclude-theme[="<theme>"]] [-l|--language[="<language>"]] [--exclude-language[="<language>"]] [-a|--area[="<area>"]] [--exclude-area[="<area>"]] [-j|--jobs[=">number>"]] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [-d|--dry-run] | Run the static view files deployment |
theme
|
|
magento theme:uninstall [--backup-code] [-c|--clear-static-content] {theme path} | Uninstall themes Composer packages |
No comments :
Post a Comment