在magento2中我們經常會用到php bin\magento 命令:參數 來完成一些操作,所以就對命令做了一個總結
常見的命令如下:
php bin/magento list 查看所有命令列表
----------------------------moudule相關的參數--------------------------------------------
1、moudule:status 查看所有module的狀態
2、moudule:disable Test_Hello(module的名稱) 禁用此module
3、moudule:enable Test_Hello(module的名稱) 啟用此module
4、module:install
-----------------------------setup相關的參數--------------------------------------------
1、setup:upgrade 更新數據
2、setup:static-content:deploy 部署magento的靜態內容
3、setup:cron:run 執行cron
----------------------------indexer相關的參數--------------------------------------------
1、indexer:status 索引的狀態
2、indexer:reindex 刷新索引
3、indexer:reset 重置索引
----------------------------cache相關的參數--------------------------------------------
1、cache:status 緩存狀態
2、cache:clean 清空緩存
3、cache:flush 刷新緩存
4、cache:enable 開啟緩存
5、cache:disable 關閉緩存