Manual:update.php

From MediaWiki.org
Jump to: navigation, search
MediaWiki File: update.php
Location: maintenance/
Source code:

master 1.19.21.18.5

Classes: None


update.php checks if the MediaWiki database schema need to be updated in order to work with the current version of MediaWiki. You should run update.php after each upgrade of MediaWiki or after the update or install of an extension that requires a schema update. Most extensions that require schema updates will say so in their documentation.

[edit] From the browser

If you do not have access to the command line of your server, then use the web updater to run the update script.

Web updater

[edit] From the command line

From the command line, or an SSH shell or similar, change to the maintenance directory and run the update script:

$ php update.php

Warning Warning: update.php may exit with errors, leaving the database in an inconsistent state. Always backup the database before running the script!

This maintenance script can be disabled via $wgAllowSchemaUpdates (in 1.18.0 by $wgMiserMode). People with extremely large and busy wikis may need to do upgrades with care, but if you're not sure if that applies to you, then it probably doesn't.

[edit] Parameters

This script offers several parameters (generic, script dependant and script specific) which may be required in some wiki environments.

[edit] Generic maintenance parameters
--help
used to get a prompt of all available script parameters (generic, script dependant and script specific) together with short explanations of their usage. These are less often used parameters.
[edit] Script specific parameters
--quick
skip countdown sequence
--nopurge
do not purge objectcache table. Normally update.php purges the objectcache table in the database (generally contains the parser cache and the messages cache), if you don't want to purge this table, use the --nopurge option.
--doshared
Update shared tables as well.
--force
Run this script even if it is disabled by configuration options.
--skip-compat-checks
Skips compatibility checks
Warning Warning: only recommended for use by developers

Extensions can install/update their schemas using LoadExtensionSchemaUpdates hook.

[edit] See also

Language: English  • Deutsch
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox