Mediawiki升级

来自linux中国网wiki
跳到导航 跳到搜索

开始升级

1.28 升级到 1.31

原因 在内网docker了一下 mediawiki 1.31 用起来 编辑界面相对以前的版本来说非常的爽 语法要求也没以前那么笨蛋 于是一直想升级

先备份1.28版本的web目录

下载1.31并解压到原来的web目录

cp 回原来相关的关键文件

在解压压缩包后,您应该从旧安装目录中复制或者移动一些文件和文件到新安装目录下:

LocalSettings.php 文件包含了您旧的配置设置。
images(或在旧版本中uploads)目录,包含所有上传至wiki的文件,除非您已选择不同的上传目录,并更改所有权和权限。find ./images -type d -exec chmod 755 {} \;和chgrp -R apache images(例如如果您的web用户是“apache”)。
在extensions目录下的扩展。您应该经常更新扩展,旧扩展不能够保证在新版本的MediaWiki下工作。
如果您使用了自定义logo,则还需要从备份中恢复该文件。在1.24版本之前通常在skins/common/images/ 目录下。在1.24版本之后在resources/assets/ 或images/ 目录下,取决于您选择使用的目录。之后在LocalSettings.php文件中添加例如如下内容$wgLogo = "$wgScriptPath/images/logo.png"; 。
在skins 目录下的自定义皮肤。
对旧安装文件或扩展所做的任何修改。


运行更新脚本

Access the command line of your server or an SSH shell or similar. You can access the command line by connecting to your server via SSH. If the local PC you are working on runs Microsoft Windows, you will need a tool like PuTTY to use SSH. From the command line or the Shell, change to the maintenance directory and execute the update script:

$ php update.php

trouble shooting

[639a0b0654ca2380b622f6b4] 2018-08-22 06:36:28: 类型“Wikimedia\Rdbms\DBQueryError”的致命错误
解决办法 运行 php update.php


see also

官方指南:升级