跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

Drupal 9 使用composer 和drush更新核心和模块

由 hrs, 6 二月, 2023

第一步:启用网站维护模式

drush sset system.maintenance_mode 1 启用维护模式

注:命令适用D8 以上版本。

第二步:清除网站缓存

drush cr 或 drush cache:rebuild

第三步:备份网站文件和数据库

mysqldump -u 用户名 -p 数据库名 > 导出的文件名

第四步:查看所需要更新核心和模块列表

composer outdated "drupal/*"

第五步:更新网站核心

composer update "drupal/*" --with-all-dependencies

第六步:更新网站模块

composer update drupal/modulename --with-all-dependencies

注:把modulename 更换为你需要更新的模块名称

第七步:更新网站数据库

drush updatedb

第八步:再次清除网站缓存

drush cr 或 drush cache:rebuild

第九步:关闭网站维护模式

drush sset system.maintenance_mode 0 关闭维护模式

至此网站更新完毕!

  • 登录或注册以发表评论
内容类型分类
技术文章
文章归类
drupal

文章标签

  • drush

评论

文章标签

Excel
CSS
ubuntu
php
vim
五笔
VPN
Linux
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
模块(module)
drush
Drupal
JavaSrcipt
apache
英语
drupal 9
nerdtree
network
果树种植
surround
drupal10
SEO
主题(theme)
二进制
更多

相关文章

  • 因权限问题导致drupal cms 无法正常安装,那么该如何解决这个问题
  • kvm虚拟机启动失败:default网络未激活
  • ubuntu 安装kvm 虚拟机
  • foreach 是 PHP 循环语句使用方法
  • implode() 函数的定义和用法
  • Drupal 11 主题制作教程
  • 检查 Composer 是否为官方源
  • 在 Drupal 中权重(Weight)是怎样排序的
  • 解决 Drupal 主题缺失问题
  • 为什么学习php 会一边学,一边忘
RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号