Magento 2 Useful Commands List

Magento 2 Useful Commands List

In this blog, I am writing some Magento 2 Useful Commands List.

Here the list of most important SSH / CLI commands for Magento 2. To use these commands you will need to have SSH access to your server or use the Command Line for local access.

  • Di compile
php -d memory_limit=10G  bin/magento setup:di:compile
  • Static content deploy
php -d memory_limit=10G  bin/magento setup:static-content:deploy -f
  • Setup upgrade
php -d memory_limit=10G  bin/magento setup:upgrade
  • Enable a module
php -d memory_limit=10G  bin/magento module:enable [Vendorname]_[Modulename]

If you want to enable an extension then you have  to run  below command sequence:

  1. First run module enables the module:
php -d memory_limit=10G bin/magento module:enable [Vendorname]_[Modulename]

2. Then run setup upgrade command to store module version at the database.

php -d memory_limit=10G  bin/magento setup:upgrade

after running the command you can find the module version at the database table setup_module.

SELECT * FROM `setup_module` WHERE module = ‘[Vendorname]_[Modulename]’;

3.After that run you need to static content deploy for genereate css and js etc .

php -d memory_limit=10G bin/magento setup:static-content:deploy -f

Total Page Visits: 14076 - Today Page Visits: 1

Leave a Reply