Jump to: navigation, search
This page is a translated version of the page Manual:Update.php and the translation is 29% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎magyar • ‎italiano • ‎日本語 • ‎polski • ‎português do Brasil • ‎русский


O arquivo update.php verifica se o esquema de banco de dados do MediaWiki precisa ser atualizado, a fim de trabalhar com a versão atual do MediaWiki. Você deve executar o update.php após cada atualização do MediaWiki ou após a atualização ou instalação de uma extensão que requer uma atualização do esquema. A maioria das extensões que precisam de atualizações de esquema terá isso em sua documentação.

A partir do navegador

Se você não tem acesso à linha de comando do seu servidor, em seguida, use o atualizador web para executar o script de atualização.

Atualizador web

From the command line

From the command line, or an SSH shell or similar:

  • Change to the maintenance directory
  • Run the update script:
$ php update.php
Atenção Atenção: 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 $wgAllowSchemaUpdatesManual:$wgAllowSchemaUpdates (in 1.18.0 by $wgMiserModeManual:$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.
Use the following on VagrantMediaWiki-Vagrant instances (from within your vagrant ssh).
$ mwscript update.php


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

Generic maintenance parameters
used to get a prompt of all available script parameters (generic, script dependent and script specific) together with short explanations of their usage. These are less often used parameters.
Script specific parameters
skip countdown sequence
do not purge objectcache table. Normally update.php purges the objectcache (generally contains the parser cache and the messages cache), msg_resource and msg_resource_links (these are used for ResourceLoaderResourceLoader message caching and are cleared in 1.21 and later) tables in the database, if you don't want to purge this table, use the --nopurge option.
Update shared tables as well.
Run this script even if it is disabled by configuration options.
Specifies the config file (the LocalSettings.php file for the specific wiki). Used for wiki families.
Skips compatibility checks
when using composer.local.json to let Composer install extensions and their dependencies, you may see an error message saying that there is a mismatch between the installed and required version (e.g. "mediawiki/semantic-breadcrumb-links: 1.3.0 installed, ~1.3 required"). You can use this parameter to ignore the message and run update.php regardless.
Atenção Atenção: Only recommended for use by developers.

Extensions can install/update their schemas using LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates hook.

Ver também