2006-04-25 18:18:38 +00:00
|
|
|
This file provides an overview of the MediaWiki upgrade process. For help with
|
2018-06-13 19:04:51 +00:00
|
|
|
specific problems, you should check:
|
2004-12-21 12:04:48 +00:00
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
* the docs at https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents ;
|
2006-04-25 18:18:38 +00:00
|
|
|
* the mediawiki-l mailing list archive at
|
2018-06-13 19:04:51 +00:00
|
|
|
https://lists.wikimedia.org/pipermail/mediawiki-l/ ; and
|
2016-07-31 20:51:47 +00:00
|
|
|
* the bug tracker at https://phabricator.wikimedia.org/
|
2005-05-02 03:58:47 +00:00
|
|
|
|
2021-04-06 21:34:27 +00:00
|
|
|
… for information and workarounds to common issues.
|
2005-05-02 03:58:47 +00:00
|
|
|
|
2006-04-25 18:18:38 +00:00
|
|
|
== Overview ==
|
2005-05-02 03:58:47 +00:00
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
We provide comprehensive documentation on upgrading to the latest version of the
|
|
|
|
|
software at https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading.
|
2004-12-21 12:04:48 +00:00
|
|
|
|
2020-12-12 13:50:50 +00:00
|
|
|
Important: Upgrading from releases older than two LTS release is not supported anymore.
|
|
|
|
|
If you want to upgrade from an old version, please upgrade to a more recent LTS version first,
|
|
|
|
|
then to this version.
|
|
|
|
|
|
2023-02-09 23:21:31 +00:00
|
|
|
Currently any upgrade from any version older than 1.35 will fail.
|
2020-12-12 13:50:50 +00:00
|
|
|
|
2006-04-25 18:18:38 +00:00
|
|
|
=== Consult the release notes ===
|
|
|
|
|
|
|
|
|
|
Before doing anything, stop and consult the release notes supplied with the new
|
2007-08-23 18:56:40 +00:00
|
|
|
version of the software. These detail bug fixes, new features and functionality,
|
2018-06-13 19:04:51 +00:00
|
|
|
and any particular points that may need to be noted during the upgrade process.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
|
|
|
|
=== Backup first ===
|
|
|
|
|
|
|
|
|
|
It is imperative that, prior to attempting an upgrade of the database schema,
|
|
|
|
|
you take a complete backup of your wiki database and files and verify it. While
|
|
|
|
|
the upgrade scripts are somewhat robust, there is no guarantee that things will
|
|
|
|
|
not fail, leaving the database in an inconsistent state.
|
|
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki is an
|
|
|
|
|
overview of the backup process. You should also refer to the documentation for
|
|
|
|
|
your database management system for information on backing up a database, and to
|
2007-08-23 18:56:40 +00:00
|
|
|
your operating system documentation for information on making copies of files.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
|
|
|
|
=== Perform the file upgrade ===
|
|
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
Download the files for the new version of the software. These are available as a
|
|
|
|
|
compressed "tar" archive from the Wikimedia Download Service
|
2017-10-15 08:52:43 +00:00
|
|
|
(https://releases.wikimedia.org/mediawiki/).
|
2006-04-25 18:18:38 +00:00
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
You can also obtain the new files directly from our Git source code repository.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
2007-08-23 18:56:40 +00:00
|
|
|
Replace the existing MediaWiki files with the new. You should preserve the
|
2009-07-23 00:31:37 +00:00
|
|
|
LocalSettings.php file and the "extensions" and "images" directories.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
2007-08-23 18:56:40 +00:00
|
|
|
Depending upon your configuration, you may also need to preserve additional
|
|
|
|
|
directories, including a custom upload directory ($wgUploadDirectory),
|
2008-05-27 17:52:46 +00:00
|
|
|
deleted file archives, and any custom skins.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
|
|
|
|
=== Perform the database upgrade ===
|
|
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
As of 1.21, it is possible to separate schema changes (i.e. adding, dropping, or
|
|
|
|
|
changing tables, fields, or indices) from all other database changes (e.g.
|
|
|
|
|
populating fields). If you need this capability, see "From the command line"
|
|
|
|
|
below.
|
2012-11-22 03:53:24 +00:00
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
==== From the Web ====
|
2010-07-08 18:46:10 +00:00
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
If you browse to the Web-based installation script (usually at
|
|
|
|
|
./mw-config/index.php) from your wiki installation you can follow the script and
|
2011-05-05 10:37:20 +00:00
|
|
|
upgrade your database in place.
|
2010-07-08 18:46:10 +00:00
|
|
|
|
|
|
|
|
==== From the command line ====
|
|
|
|
|
|
2023-06-16 12:20:05 +00:00
|
|
|
From the command line, browse to the "maintenance" directory and use
|
|
|
|
|
`run.php update` to check and update the schema. This will insert missing
|
2006-04-25 18:18:38 +00:00
|
|
|
tables, update existing tables, and move data around as needed. In most cases,
|
|
|
|
|
this is successful and nothing further needs to be done.
|
|
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
If you need to separate out the schema changes so they can be run by someone
|
|
|
|
|
with more privileges, then you can use the --schema option to produce a text
|
|
|
|
|
file with the necessary commands. You can use --schema, --noschema,
|
|
|
|
|
$wgAllowSchemaUpdates as well as proper database permissions to enforce this
|
|
|
|
|
separation.
|
2012-11-22 03:53:24 +00:00
|
|
|
|
2006-04-25 18:18:38 +00:00
|
|
|
=== Check configuration settings ===
|
|
|
|
|
|
2018-06-13 19:04:51 +00:00
|
|
|
The names of configuration variables, and their default values and purposes, can
|
|
|
|
|
change between release branches, e.g. $wgDisableUploads in 1.4 is replaced with
|
|
|
|
|
$wgEnableUploads in later versions. When upgrading, consult the release notes to
|
|
|
|
|
check for configuration changes which would alter the expected behavior of
|
|
|
|
|
MediaWiki.
|
2006-04-25 18:18:38 +00:00
|
|
|
|
2008-09-23 11:13:10 +00:00
|
|
|
=== Check installed extensions ===
|
2010-03-10 21:54:23 +00:00
|
|
|
|
2011-05-05 10:37:20 +00:00
|
|
|
Extensions usually need to be upgraded at the same time as the MediaWiki core.
|
|
|
|
|
|
2006-04-25 18:18:38 +00:00
|
|
|
=== Test ===
|
|
|
|
|
|
|
|
|
|
It makes sense to test your wiki immediately following any kind of maintenance
|
|
|
|
|
procedure, and especially after upgrading; check that page views and edits work
|
2018-06-13 19:04:51 +00:00
|
|
|
normally, that special pages continue to function, etc., and correct any errors
|
2006-04-25 18:18:38 +00:00
|
|
|
and quirks which reveal themselves.
|
|
|
|
|
|
2007-08-23 18:56:40 +00:00
|
|
|
You should also test any extensions, and upgrade these if necessary.
|