Today, I am explaining you, if you are developing Magento 2 website so this post is very useful for you. I am providing you list of magento 2 command. here is some basic commands list that are related to Cache, Admin, Modules, Indexer and Info commands. I have also mentioned some short command so you can also use short command as well.
Cache Commands –
Here list of some command that are related to Magento 2 cache manipulation. below are some command that will provide cache enable, disable, clean, flush or check status of Magento cache.
1) Enable all caches or specific cache type
Command :
php bin/magento cache:enable
OR
php bin/magento c:e
2) Disable all caches OR specific cache type
Command :
php bin/magento cache:disable
OR
php bin/magento c:d
3) Check the status of cache types and their status
Command :
php bin/magento cache:status
OR
php bin/magento c:s
4) Deletes all cache of the same storage. it will delete all cache that also available third party will also delete all cache.
Command :
php bin/magento cache:flush
OR
php bin/magento c:f
5) delete cache types linked with Magento website.
Command :
php bin/magento cache:clean
OR
php bin/magento c:c
Admin Commands –
Here list of some command that are related to Magento 2 create a new admin user, edit or unlock the user that is already created through Magento CLI.
1) Create admin account command. here is basic syntax it also need some other parameter like admin‐user,admin‐password,admin‐email,admin‐firstname and admin‐lastname.
Command :
php bin/magento admin:user:create
OR
php bin/magento a:u:c
2) Unlock admin user account
Command :
php bin/magento admin:user:unlock adminusername
OR
php bin/magento a:u:u adminusername
Module Commands –
Here list of some command that are related to Magento 2 module . here you check enable, disable, uninstall or check the status of module.
1) check the status of magento 2 module
Command :
php bin/magento module:status
OR
php bin/magento mo:s
2) enable specific Magento module by its name.
Command :
php bin/magento module:enable module_name
OR
php bin/magento mo:e module_name
3) disable specific Magento module by its name.
Command :
php bin/magento module:disable module_name
OR
php bin/magento mo:d module_name
4) uninstall specific Magento module by its name.
Command :
php bin/magento module:uninstall
OR
php bin/magento mo:u
Indexer Commands –
Here list of some command that are related to Magento 2 indexer things. but FYI, in magento 2 admin section having option to indexing. in reindexing, you can set indexing mode and check the status of indexer via Magento command.
1) it will list of all indexers.
Command :
php bin/magento indexer:info
OR
php bin/magento i:i
2) change the indexer mode.
Command :
php bin/magento indexer:set-mode
OR
php bin/magento i:set
3) status of all indexers
Command :
php bin/magento indexer:status
OR
php bin/magento i:st
4) reindex all the indexer
Command :
php bin/magento indexer:reindex
OR
php bin/magento i:rei
5) for viewing indexer configuration
Command :
php bin/magento indexer:show-mode
OR
php bin/magento i:show
6) invalidate all the indexer
Command :
php bin/magento indexer:reset
OR
php bin/magento i:res
Info Commands –
Here list of some command that are related to Magento 2 information command. like adminuri, backup and currecy etc.
1) it will displays the Magento 2 admin URI
Command :
php bin/magento info:adminuri
OR
php bin/magento i:a
2) it prints list of available backup files
Command :
php bin/magento info:backups:list
OR
php bin/magento i:b:l
3) it shows number of dependencies Magento framework
Command :
php bin/magento info:dependencies:show-framework
OR
php bin/magento i:d:show-framework
4) it displays the list of available currencies
Command :
php bin/magento info:currency:list
OR
php bin/magento i:c:l
5) it shows number of dependencies between modules
Command :
php bin/magento info:dependencies:show-modules
OR
php bin/magento i:d:show-modules
6) it displays the list of available language locales
Command :
php bin/magento info:language:list
OR
php bin/magento i:l:l
7) it displays the list of available timezones
Command :
php bin/magento info:timezone:list
OR
php bin/magento i:t:l
Write-up
In webdeveloperindia tutorial, I have covered some basic Magento 2 commands. I hope you got this tutorial very useful. If you want to give any feedback or share it in the comments section below.
Hello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento 1/2, Codeigniter, WordPress, Joomla, Shopify, Git, Bitbuket, jQuery, Ajax, Javascript and ReactJS.