首页 > 技术文章 > magento2常见的命令

dongtong 2017-02-08 11:13 原文

在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    关闭缓存

推荐阅读