一、命令预览
安装在安装目录执行php bin/magento将会出现所有可用命令:例如
Magento CLI 2.3.2
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
admin
admin:user:create 创建一个管理员
admin:user:unlock 解锁管理员账号
app
app:config:dump 创建应用程序转储
app:config:import 从共享配置文件导入数据到适当的数据存储
app:config:status 检查配置传播是否需要更新
cache
cache:clean 清除缓存
cache:disable 禁用缓存
cache:enable 开启缓存
cache:flush 刷新缓存
cache:status 检查缓存的撞他
catalog
catalog:images:resize 跳转图片的大小
catalog:product:attributes:cleanup 清除无用的属性.
config
config:data:export 倒出 config的配置文件内容
config:data:import 导入config文件
config:sensitive:set 设置敏感的配置值
config:set 更改系统配置
config:show 显示给定路径的配置值。如果没有指定path,将显示所有保存的值
cron
cron:install 为当前用户生成并安装crontab
cron:remove 从crontab删除任务
cron:run 按进度运行作业
customer
customer:hash:upgrade 根据最新算法升级客户哈希
deploy
deploy:mode:set 设置应用程序模式。
deploy:mode:show 显示当前应用程序模式。
dev
dev:di:info 提供有关命令的依赖项注入配置的信息。
dev:profiler:disable 禁用分析器。.
dev:profiler:enable 开启分析器
dev:query-log:disable 禁用DB查询日志
dev:query-log:enable 启用DB查询日志
dev:source-theme:deploy 收集和发布主题的源文件。
dev:template-hints:disable 禁用前端模板提示
dev:template-hints:enable 启用前端模板提示。可能需要缓存刷新。.
dev:tests:run 运行册数
dev:urn-catalog:generate 生成urn的目录到*。用于突出显示xml的IDE的xsd映射。
dev:xml:convert 使用XSL样式表转换XML文件
encryption
encryption:payment-data:update 用最新的加密密码重新加密已加密的信用卡数据。
i18n
i18n:collect-phrases 发现代码库中的翻译短语
i18n:collect-phrases-enh 发现代码库中的短语
i18n:pack 包装语言包
i18n:uninstall 卸载语言包
indexer
indexer:info 显示了可用索引器
indexer:reindex 重建索引数据
indexer:reset 将索引器状态重置为无效
indexer:set-dimensions-mode 设置索引器尺寸模式
indexer:set-mode 设置索引模式类型
indexer:show-dimensions-mode 显示索引器维度模式
indexer:show-mode 显示索引模式
indexer:status 显示索引器的状态
info
info:adminuri 显示Magento后台URI
info:backups:list 打印可用的备份文件列表
info:currency:list 显示可用货币的列表
info:dependencies:show-framework 显示对Magento框架的依赖项数
info:dependencies:show-modules 显示模块之间的依赖关系数量
info:dependencies:show-modules-circular 显示模块之间循环依赖关系的数量
info:language:list 显示可用语言区域列表
info:timezone:list 显示可用时区列表可用时区列表
integration
integration:data:set 设置集成的数据(名称、令牌、秘密)
maintenance
maintenance:allow-ips 维护:允许的ip
maintenance:disable 禁用维护模式
maintenance:enable 启用维护模式
maintenance:status 显示维护模式状态
module
module:disable 禁用指定模块
module:enable 启动指定模块
module:status 显示模块的装态
module:uninstall 卸载由编写器安装的模块
msp
msp:security:recaptcha:disable 禁用后台验证码
newrelic
newrelic:create:deploy-marker 检查部署队列中的条目,并创建适当的部署标记。
queue
queue:consumers:list MessageQueue用户列表
queue:consumers:start Start MessageQueue consumer
sampledata
sampledata:deploy 为基于合成的Magento安装部署示例数据模块
sampledata:remove 从composer.json中删除所有样例数据包
sampledata:reset 重置所有样本数据模块以便重新安装
setup
setup:backup 备份Magento应用程序代码库、媒体和数据库
setup:config:set 创建或修改部署配置
setup:cron:run 为安装应用程序运行调度的cron作业
setup:db-data:upgrade 在数据库中安装和升级数据
setup:db-declaration:generate-patch 生成补丁,并把它放在特定的文件夹。
setup:db-declaration:generate-whitelist 生成允许声明安装程序编辑的表和列的白名单
setup:db-schema:upgrade 安装和升级数据库模式
setup:db:status 检查数据库架构或数据是否需要升级
setup:di:compile 设置:di:编译
setup:install 安装magento2程序
setup:performance:generate-fixtures Generates fixtures
setup:rollback 回滚Magento应用程序代码库、媒体和数据库
setup:static-content:deploy 部署静态视图文件
setup:store-config:set 安装存储配置。自2.2.0弃用。使用配置:设置
setup:uninstall 卸载Magento应用程序
setup:upgrade 升级Magento应用程序、DB数据和模式
store
store:list 显示商店列表
store:website:list 显示网站列表