Magento 2 Commands | Short Commands | Usage of Commands |
php bin/magento setup:upgrade | php bin/magento s:up | Upgrades the Magento application to the latest version, DB data, and schema |
php bin/magento setup:di:compile | php bin/magento s:d:c | Generates DI configuration and all missing classes that can auto-generated |
php bin/magento indexer:reindex | php bin/magento i:rei | Reindexes Data |
php bin/magento cache:flush | php bin/magento c:f |
Flushes all Magento 2 cache types. It will impact other parts of the storage which is a part of the same storage.
|
php bin/magento cache:clean | php bin/magento c:c | Deletes all the enabled Magento-related caches. |
php bin/magento setup:static-content:deploy -f | php bin/magento s:s:d | Deploys static view files ( f – ofr force deploy) |
php bin/magento catalog:images:resize | php bin/magento c:i:r | Creates resized product images |
php bin/magento catalog:product:attributes:cleanup | php bin/magento c:p:a:c | Removes unused product attributes. |
php bin/magento deploy:mode:show | php bin/magento d:m:sho | Displays current application mode. |
php bin/magento deploy:mode:set developer | Set application mode to Development | |
php bin/magento dev:template-hints:disable | Disable frontend template hints. A cache flush might be required. | |
php bin/magento dev:template-hints:enable | Enable frontend template hints. A cache flush might be required. | |
php bin/magento maintenance:enable | Enables maintenance mode in Magento 2 | |
php bin/magento maintenance:allow-ips | Sets maintenance mode exempt IPs | |
php bin/magento maintenance:disable | This command disables maintenance mode in Magento 2 | |
php bin/magento info:adminuri | php bin/magento i:a | Displays the Magento Admin URI |
php bin/magento module:disable | php bin/magento mo:d | Disables specified modules |
php bin/magento module:enable | php bin/magento mo:e | Enables specified modules |
php bin/magento module:status | php bin/magento mo:s | Displays status of modules |
php bin/magento indexer:status | Displays the status of reindexing | |
php bin/magento indexer:reindex {index name} | Reindex a specific index ( Eg. catalog_category_product ) | |
php bin/magento indexer:reset | All index tables will be truncated, and all index data will be removed. | |
php bin/magento setup:db-schema:upgrade | This command upgrades the Magento 2 database schema. | |
php bin/magento list | Displays full list of commands in your Magento 2 installation directory |
0484 244 1461
[email protected]