From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page Help:Import and the translation is 40% complete.
Meta-Wiki Importer icon
Meta-Wiki Importer icon

There are two types of import, both accessed through Special:Import:

  • transwiki import, also called interwiki import: import pages directly from another wiki; the settings of the destination wiki determine which source wikis are enabled; message with id 'import-interwiki-text' (talk) appears; after "Transfer pages into namespace" one can specify a target namespace; the option "all" actually means "the same as the original".
  • upload import: import a file in a special XML format produced by exporting pages from another wiki; message with id 'importtext' (talk) appears;

Zie de pagina Importer voor informatie over de gebruikersgroep die deze acties uitvoert.

Transwiki import

On many Wikimedia wikis transwiki import is disabled too, it gives message with id 'importnosources' (talk): "No wikis from which to import have been defined and direct history uploads are disabled." However, pages from commons:, foundation:, w:, cs: and fr: can currently be imported to Meta, and pages from Meta can be imported to mw:. The act of importing is added to the page history and to Special:Log/import.

If an imported page has the same name as an existing page in the target wiki, the page is overwritten if the imported page is newer (according to the timestamps). If an error occurred during the import then you may find the import is partially complete (some pages imported, but not all). Since pages are overwritten, attempting the import again should not be a problem.

If you specified to include history information, then you should also see information about the edits in the 'history' of the imported pages, and in the user contributions. The edits will not show up in 'recent changes' (neither positioned at the time of the original edit, nor at the time of importing). The effect will be similar to a full history merge and it may be quite difficult to later determine which edits were imported.

There is an option "Include all templates", which will import the templates that are on an imported page. If this is not used they will be redlinked unless a template of the same name exists on the target wiki. If this is used, templates of the same name on the target wiki will be overwritten and the import will include not only the templates on the imported page but also any templates used within those templates. It is possible to import a collection of pages by specially creating a page that transcludes them, and importing that page, with the option on. However, this should be done very carefully or it may result in far more being imported than desired - again, it will import all templates on the transcluded pages and all templates nested within those templates.

Useful applications of importing include:

  • when a page is moved to another wiki and subsequently edited there, have the history together in the target wiki; this is especially useful if the source page becomes more difficult to find due to page moves etc.
  • when a page is moved to another wiki and deleted on the source wiki, preserve the history.
  • in order to have templates that exist on another wiki/subdomain.
  • on certain projects such as wikisource and wiktionary, to move multilingual content between language subdomains.


To check whether your wiki has the transwiki right configured, and, where it is configured, to which wikis, you can query your wiki using the api.

The configuration is expressed in <param name="interwikisource" description="For interwiki imports: wiki to import from"> …

Alternatively one can check the global configurations at and look in the section wgImportSources.

If there is no transwiki configured, then seek your local community's consensus to have the transwiki configured, and to identify from which wikis you may wish to import. Requests for configuration changes should be lodged in Phabricator:. You would be expected to link to your community's discussion in your bug request.

A query of the API at your local wiki would also display the usergroup rights, check for the <add> tag

Assignation of transwiki import rights

Most transwiki rights are assigned to users following a successful discussion in their community's wiki, followed up by a request to stewards at Steward requests/Permission. Some wikis have requested and been granted that local bureaucrats be able to assign this right, check with your wiki for the current situation there.

Upload import

How to export, and the format of exported pages, is described at mw:Help:Export. Normally any user can export wiki pages to a file, but to import pages into a wiki from a file, you must have 'Sysop' privileges on that wiki. So if you have your own MediaWiki installation, then you should be able to see the 'Special:Import' page there. Within the Wikimedia Foundation family of wiki projects, only users with the importupload user-right can import pages into a wiki from a file; this includes only members of the "importer" group and stewards.

To import wiki pages from your computer, simply click browse to locate the file on your local file system.

Editing the import file

In the case of upload import, because of the simple readable file format the XML file can easily be edited between exporting and importing. This should be done with caution and integrity, one can make antedated edits and use false user names, and in combination with deletion, one can "change history". Applications of this editing include:

  • adding a note to the edit summary about the importing
  • changing user names and/or page names to avoid name conflicts (just between the title tags and between the username tags or also in links and signatures)
  • changing namespace names into the generic or the applicable ones (ditto)

Note that if two versions of the page have the same timestamp (because one was uploaded with the same timestamp as a preexisting version), the later (imported) version will show up in the edit history but not in the article itself.

See mw:Manual:XML Import file manipulation in CSharp for an example of working with these XML files in Visual Studio .NET C#.

Geschiedenissen samenvoegen en andere complicaties

Zie ook mw:Manual:Importing_XML_dumps#Troubleshooting.

Als de import geschiedenisinformatie bevat en de bewerkingen bevatten een gebruikersnaam die in het importerende project wordt gebruikt door iemand anders, dan moet de geüploade import worden aangepast en de bedoelde gebruikersnaam in het XML bestand moet eerst vervangen worden voor een andere naam om onduidelijkheid te voorkomen. Als de gebruikersnaam nog niet gebruikt werd in het importerende project dan zijn de gebruikersbijdrage hoe dan ook beschikbaar, hoewel er niet automatisch een account wordt aangemaakt.

Net zoals wanneer een pagina wordt aangeschreven in een link en/of in een URL, worden generieke naamruimtes automatisch omgezet en als een prefix niet een naamruimte naam is, dan komt de pagina in de hoofdnaamruimte terecht. Dat wil echter zeggen "Meta:" wordt genegeerd (vervalt) in een project dat dat prefix gebruikt voor interwiki linken. Het zou wenselijk zijn omdat te vervangen in het XML bestand naar "Project:" voor het importeren.

If a page name exists already, importing revisions of a page with that name causes the page histories to be merged. Note that after inserting a revision between two existing revisions in the page history, the change made by the user who made the next edit seems different from what it actually has been: to see the actual change made by the user one has to take the diff between the two already existing revisions, not the diff with respect to the inserted one. Therefore this should not be done except to reconstruct the true page history.

A revision is not imported if a revision of the same page, date, and time (up to the exact second) exists already. In practice this occurs only when the revision has already been imported (either to the current wiki, or previously to the wiki from which the export was made, or both were imported from a third site).

An edit summary may refer to, and possibly link to, another page. This may be confusing when the page has been imported but the target page has not.

The edit summary does not automatically show that the page has been imported, but in the case of upload import that can be added to the edit summaries in the XML file before importing. That can avoid some potential sources of ambiguity and/or confusion. When editing the XML file with find/replace, note that adding a text to the edit summaries requires distinguishing between edits which already have an edit summary, hence comment tags in the XML file, and those without these tags. If there are multiple pairs of comment tags, only the last one is effective.


Zonder bepalingen voor gebruikersnaam conflicten laat de lijst met bijdrage zien:

  • de bewerkingen door het persoon dat geregistreerd staat onder de gebruikersnaam op het betreffende project
  • voor elke wiki vanwaar pagina's zijn geïmporteerd, de bewerkingen op geïmporteerde pagina's voor importeren door de gebruiker die op het bronproject de betreffende gebruikersnaam heeft

Als op het moment van importeren de pagina nog niet bestond op de doel site, dan kunnen de twee onderscheiden worden door de tijd van importeren te vergelijken met de tijd van bewerken.

Als de gebruikerspagina en de overlegpagina van de gebruiker nog geen gebruikersbijdrage link in de rand van de pagina hebben dan is de gebruiker niet geregistreerd en worden alle bewerkingen geïmporteerd.

Grootschalige overdracht

Voor een grootschalige overdracht kan iemand met voldoende systeembevoegdheden data verplaatsen binnenin de server, wat praktischer is dan grote XML bestanden te versturen vanaf de server naar een lokale computer van een gebruiker en dan weer terug naar de server.

Grote bestanden kunnen worden afgekeurd om twee redenen. De PHP upload limiet, te vinden in het PHP configuratie bestand php.ini:

 ; Maximum allowed size for uploaded files.
 upload_max_filesize = 20M

En ook de verborgen variabele limiteert de grote in het inputformulier. Te vinden in de mediawiki broncode, includes/specials/SpecialImport.php:

   <input type='hidden' name='MAX_FILE_SIZE' value='20000000' /> 

Misschien moet u de volgende vier instellingen veranderen in php.ini:

; Maximum size of POST data that PHP will accept.
post_max_size = 20M
max_execution_time = 1000  ; Maximum execution time of each script, in seconds
max_input_time = 2000	    ; Maximum amount of time each script may spend parsing request data
; Default timeout for socket based streams (seconds)
default_socket_timeout = 2000

Zie ook

  • data dumps describes the maintenance script maintenance/importDump.php which provides an alternate import mechanism, but hasn't always remained in working order with recent MediaWiki releases
  • Importer