在magento2中咱們常常會用到php bin\magento 命令:參數 來完成一些操做,因此就對命令作了一個總結php
常見的命令以下:緩存
php bin/magento list 查看全部命令列表spa
----------------------------moudule相關的參數--------------------------------------------blog
一、moudule:status 查看全部module的狀態索引
二、moudule:disable Test_Hello(module的名稱) 禁用此modulerem
三、moudule:enable Test_Hello(module的名稱) 啓用此module部署
四、module:installit
-----------------------------setup相關的參數--------------------------------------------class
一、setup:upgrade 更新數據module
二、setup:static-content:deploy 部署magento的靜態內容
三、setup:cron:run 執行cron
----------------------------indexer相關的參數--------------------------------------------
一、indexer:status 索引的狀態
二、indexer:reindex 刷新索引
三、indexer:reset 重置索引
----------------------------cache相關的參數--------------------------------------------
一、cache:status 緩存狀態
二、cache:clean 清空緩存
三、cache:flush 刷新緩存
四、cache:enable 開啓緩存
五、cache:disable 關閉緩存