Useful Command List For Beginners In Magento 2

Hello Everyone,

In this blog, we will learn about Magento 2 Useful Commands for beginners.

It is not possible to keep all commands in mind when you just start a Magento 2.

So we have created a list of useful commands for Magento 2.

Without wasting your time, let us guide you straight away.

LIST OF MAGENTO 2 USEFUL COMMANDS

1. Setup Commands:

CommandDescription
php bin/magento setup:upgradeUpgrade the Magento Application, DB Schema and Data
php bin/magento setup:di:compileGenerate DI Configuration and Missing Classes generated Automatically
php bin/magento setup:static-content:deployDeploys the static view files
php bin/magento setup:db-data:upgradeInstall and Update Data in the Database
php bin/magento setup:db:statusCheck of DB update required
php bin/magento setup:backupTake Backup of Magento Application, Code Base, and Media Directory
php bin/magento setup:cron:runRuns the scheduled cron job
php bin/magento setup:performance:generate-fixturesGenerates fixtures
php bin/magento setup:rollbackRollback the Magento Application, Code Base, and Media Directory
php bin/magento setup:config:setCreates or Modifies the Deployment Configuration
php bin/magento setup:store-config:setSets the Store Configuration
php bin/magento setup:installInstall the Magento Application
php bin/magento setup:uninstallUninstall the Magento Application

2. Cache Commands:

CommandDescription
php bin/magento cache:cleanClean the cache types
php bin/magento cache:enableEnable the cache types
php bin/magento cache:disableDisable the cache types
php bin/magento cache:flushFlush the cache storage
php bin/magento cache:statusDisplay the cache status

3. Deploy Commands:

CommandDescription
php bin/magento deploy:mode:setSets the Application mode
php bin/magento deploy:mode:showShows the current Application mode

4. Indexers Commands:

CommandDescription
php bin/magento indexer:infoShows the available Indexers
php bin/magento indexer:reindexReindex the Data
php bin/magento indexer:resetReset Index Status to Invalid
php bin/magento indexer:set-modeSet Index Mode
php bin/magento indexer:show-modeShows the Index Mode
php bin/magento indexer:statusShows the status of Indexer

5. Module Commands:

CommandDescription
php bin/magento module:enableEnable the specific Module
php bin/magento module:disableDisable the specific Module
php bin/magento module:statusShows the status of the Module
php bin/magento module:uninstallUninstall the module that is Installed by Composer

6. Sample Data Commands:

CommandDescription
php bin/magento sampledata:deployDeploy sample data module
php bin/magento sampledata:removeRemove sample data package from composer.json file
php bin/magento sampledata:resetReset the sample data module for re-installation

7. i18n Commands:

CommandDescription
php bin/magento i18n:collect-phrasesCollects the phrases in the codebase
php bin/magento i18n:packSaves language pack
php bin/magento i18n:uninstallUninstalls the language pack

8. Catalog Commands:

CommandDescription
php bin/magento catalog:images:resizeCreate resized product images
php bin/magento catalog:product:attributes:cleanupClear unused product attributes

9. Maintenance Commands:

CommandDescription
php bin/magento maintenance:enableEnable the maintenance mode
php bin/magento maintenance:disableDisable the maintenance mode
php bin/magento maintenance:statusShows the status of maintenance mode
php bin/magento maintenance:allow-ipsSets the IP address for the maintenance mode

10. Admin Commands:

CommandDescription
php bin/magento admin:user:createCreate an Admin User
php bin/magento admin:user:unlockUnlocks the Admin Account

11. Cron Commands:

CommandDescription
php bin/magento cron:runRuns the cron Job by Schedule
php bin/magento cron:installGenerate and install crontab
php bin/magento cron:removeRemoves tasks from crontab

12. Theme Command:

CommandDescription
php bin/magento theme:uninstallUninstall the theme

13. Info Commands:

CommandDescription
php bin/magento info:adminuriDisplay Magento Admin URL
php bin/magento info:backups:listDisplay Available Backups
php bin/magento info:currency:listDisplay Available Currencies
php bin/magento info:dependencies:show-frameworkDisplay the dependencies in the Magento
php bin/magento info:dependencies:show-modulesShows Dependencies between modules
php bin/magento info:dependencies:show-modules-circularShows number of circular dependencies between modules
php bin/magento info:language:listDisplay the list of available language locale
php bin/magento info:timezone:listDisplay available timezone

14. Store Commands:

CommandDescription
php bin/magento store:listShows the list of available stores
store:website:listShows the list of available websites

15. Dev Commands:

CommandDescription
php bin/magento dev:source-theme:deployCollect and display source theme files
php bin/magento dev:tests:runRuns the test
php bin/magento dev:urn-catalog:generateGenerate URN catalog 
php bin/magento dev:xml:convertConvert XML files using XSL style sheets

16. Config Commands:

CommandDescription
php bin/magento config:sensitive:setSets the sensitive configuration value
php bin/magento config:setChange System Configuration
php bin/magento config:showShows configuration value for the specified path

Final Thoughts:

So this was the easiest way which we have told you in this blog. Hope you liked the blog.

So quickly go to the comment box and tell me how you like this blog?

Stay tuned with us on our site to get new updates of Magento.

Thanks for reading and visiting our site.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *