Ask your Question



Magento Developers At magePoint

Faridabad,  India

jr. php developer

bhopal,  India

muzffarpur,  India

Chiplun,  India
Everest Educational
Everest Educational

Visa Consultants in Punjab

Ludhiana,  India

Write to us

Ask Question

Magento 2 Useful Commands Shortcut

Shailesh Kumar

List of useful commands for Magento 2 shortcuts  

Setup Upgrade Using Command Line  

 php bin/magento setup:upgrade  


If you don’t want to remove pub/static files while installing/updating database then use following command.  

 php bin/magento setup:upgrade --keep-generated  


 Cache Clean Using Command Line  

 php bin/magento cache:clean  


 Cache Flush Using Command Line  

 php bin/magento cache:flush  


 View cache status Using following command Line  

 php bin/magento cache:status  


 Enable Cache Using Command Line  

 php bin/magento cache:enable  


Disable Cache Using Command Line  

 php bin/magento cache:disable [cache_type]  


 Static Content Deploy Using Command Line  

 php bin/magento setup:static-content:deploy  

 (Use -f for force deploy on 2.2.x or later)  

 php bin/magento setup:static-content:deploy - f  


 Static Content Deploy For Particular Language Using Command Line  

 php bin/magento setup:static-content:deploy en_US  


 Static Content Deploy For Magento Backend Theme Using Command Line (Working on 2.1.1 or later)  

 php bin/magento setup:static-content:deploy --theme="Magento/backend"  


 Static Content Deploy For Specific Themes Using Command Line (Working on 2.1.1 or later)  

 php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme  

 Enable module Using Command Line  

 php bin/magento module:enable Namespace_Module  


 Disable module Using Command Line  

 php bin/magento module:disable Namespace_Module  


Uninstall Module Using Command Line  

 php bin/magento module:uninstall Namespace_Module  


 Reindexing Using Command Line  

 php bin/magento indexer:reindex  


View the list of indexers Using Command Line  

 php bin/magento indexer:info  


View indexer status Using Command Line  

 php bin/magento indexer:status  


 Show the mode of all indexers Using Command Line      

 php bin/magento module:status  


 Check Current Mode Using Command Line  

 php bin/magento deploy:mode:show  


 Change To Developer Mode Using Command Line  

 php bin/magento deploy:mode:set developer  


 Change To Production Mode Using Command Line  

 php bin/magento deploy:mode:set production  


 Run the single-tenant Compiler Using Command Line  

php bin/magento setup:di:compile  


Unlock Admin User Using Command Line  

 php bin/magento admin:user:unlock adminusername  


 Enable Maintenance Mode Using Command Line  

 php bin/magento maintenance:enable  


 To enable maintenance mode for all clients except and  

 php bin/magento maintenance:enable --ip= --ip=  


 To clear the list of IPs.  

 php bin/magento maintenance:enable --ip=none  


 Disable Maintenance Mode Using Command Line  

 php bin/magento maintenance:disable  


 Check Maintenance Mode Status Using Command Line  

 php bin/magento maintenance:status  


 How to Allow IP on Maintenance Mode Using Command Line  

 php bin/magento maintenance:allow-ips --ip= --ip=  


 Set Magento crontab Using Command Line  

 php bin/magento cron:install --force (Use --force to rewrite an existing Magento crontab.)  


 To view the crontab, enter the following command as the Magento file system owner.  

 crontab -l  


Remove Magento crontab Using Command Line  

php bin/magento cron:remove  

Enable Merge CSS

php bin/magento config:set dev/css/merge_css_files 1

Disable Merge CSS

php bin/magento config:set dev/css/merge_css_files 0

Enable Merge JS

php bin/magento config:set dev/js/merge_files 1

Disable Merge JS

php bin/magento config:set dev/js/merge_files 0

Enable Frontend template hints

php bin/magento dev:template-hints:enable

Disable Frontend template hints

php bin/magento dev:template-hints:disable

Shailesh Kumar

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site