Useful Magento 2 commands

  • php bin/magento cache:clean – clean cache
  • php bin/magento cache:flush – cleant Magento cache
  • php bin/magento setup:di:compile – code compilation
  • php bin/magento indexer:reindex
  • php bin/magento setup:static-content:deploy
  • php bin/magento deploy:mode:set developer – set developer mode
  • php bin/magento cron:install [–force]
  • crontab -l
  • php bin/magento dev:tests:run
  • php bin/magento dev:source-theme:deploy
  • php bin/magento deploy:mode:show – shows current mode
  • php bin/magento deploy:mode:set production – set production mode
  • php bin/magento setup:upgrade

How do I see which Magento modules enabled and disabled?

Run this command and you will see enabled and disabled modules:

php bin/magento module:status  (displays a list of Magento enabled and disabled modules )

How to disable magento 2 module through terminal?

php bin/magento module:disable Vendor_modulename (this will disable Magento 2 module)

How to enable magento 2 module through terminal?

php bin/magento module:enable Vendor_modulename  (this will enable Magento 2 module)

How to uninstall magento 2 module through terminal?

php bin/magento module:uninstall Vendor_modulename  (this will uninstall Magento 2 module)

DG WEB FACTORY

Get in Touch

We would be more than happy to meet you and hear your story. Get to know your goals and create a solid partnership with you!

+37125693580
sales@dgwebfactory.com