Help talk:Import

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Is import possible for Wikipedia "administrators only"? So every of more than hundred admins can change this history without being noticed? -- Nichtich 21:33, 17 May 2005 (UTC)

I think it would be good if imports were in Recent changes and (in the case of merging page histories) in the watchlist, or at least in some log. By the way, by importing you only add edit lines (entries in the page history), not change those which already exist. For that you have to delete the page temporarily, which is logged.--Patrick 06:24, 18 May 2005 (UTC)

How to import the xml-files?[edit]

Hi! Can anyone tell me how to import the xml-files into one wiki generated from another wiki? I am missing a function or button like "import xml/article"...

For sysops it is in the list of special pages, or use Special:Import. However, on Meta and w:en: it currently gives "No transwiki import sources have been defined and direct history uploads are disabled." Does anyone know how transwiki import sources can be defined?--Patrick 22:10, 19 July 2005 (UTC)

In the MediaWiki configuration files, not sysop-accessible. There are still some important things that need to be fixed, such as logging, before this is turned on. --brion 11:39, 20 July 2005 (UTC)
I see, thanks.--Patrick 12:54, 20 July 2005 (UTC)
Sorry, not in my Wiki :-) Just installed, everything went fine (in my LAN), just that no WikiSysop was created. I created an account "WikiSysop" and used mySQL to update the user_rights table entry of this account (ID 2) to bureaucrat,sysop ... Now I can see the SysOp-Special pages now, but there is no Link to Special:Import. If I edit any page and insert the link (in english and my language - German "Spezial:Import" i get nowhere (Page doesn't exist)... Either the name "Import" is different in the German setting or it just doesn't work... --Ralf Wohner 5 August 2005

Importing plain text articles into the Wiki[edit]

Hi, I am quite new to Wiki coding.

I do have a hughe bunch or articles in an Access database. Mostly simple long texts. To avoid now a long copy paste action I'd like to import them into my new Wiki. Getting the data with PHP out of my database is no problem. But I am a bit lost in the usage of the Wiki classes.

Can anybody provide me some help, such a workflow or a rough guide through the classes? The rest I could find hopefully myself.

Regards Brutus-- 10:13, 3 September 2005 (UTC)


Which is the earliest version that includes this? 1.4.9 does not have it and I think 1.5rc4 has it. --Anshul 16:10, 11 September 2005 (UTC)

Import does not overwrite existing articles[edit]

The documentation mentions that importing pages will overwrite existing pages if they have identical names. However, if I try it within MediaWiki 1.5.4 it does not overwrite the existing page(s). Is this a bug within MediaWiki or within the documentation?

Martin Szugat-, 24 December 2005 (UTC)

Are you sure the date of the imported page is later than the latest page revision it's supposed to overwrite? Simetrical 01:00, 25 January 2006 (UTC)
I'm havign the same problem, dang it. -- 21:21, 13 March 2006 (UTC)
I had the same problem until I followed Simetrical's advice. Make sure the revision date in the <timestamp> tag is newer than the current revision in the database. Once I did that, it worked great. I'm pretty sure the timestamp is GMT, so make sure you add your local offset, but it isn't documented. --JeffLane 20:17, 24 March 2006 (UTC)
FYI I kinda blunt forced it and simply updated every revision date in the mysql database to some distant date in order to import everything. I was importing an entire wiki site to a new installation. This unfortunately had the effect of never updating the main page, as the revision date on the main page of a new installation will always be later than one I am trying to import. A simple update sql statement later, and everything, including the main page, imported just fine. Having said that, I'm going to guess there are better ways of migrating an entire wiki site from one machine to another. -Matthew Tripp-- 18:07, 23 February 2010 (UTC)

No categories after import[edit]

I've imported several hundred pages with different categories and sub-categories. When I goto the category pages it does not list any articles nor does it list any sub-categories. Only when I edit and save the pages does it create the appropriate categories and list the articles. Doing this for every article and sub-category would be a very time consuming task. Is there anyway to do a check on the articles and categories to make sure that all are showing up?


Currently import does not update the link tables. Run refreshLinks.php. --brion 08:13, 1 March 2006 (UTC)

Wonderful.. Exactly what I needed!

Import function limited to Wikipedia articles only?[edit]

As an admin at English Wiktionary and English Wikisource, What I see at the importing special pages show:

Transwiki import

Select a wiki and page title to import. Revision dates and editors' names will be preserved. All transwiki import actions are logged at the import log.

Copy all history versions for this page Transfer pages into namespace:

I just do not know why I cannot browse files saved to my disk and why I cannot transwiki from other than English Wikipedia.--Jusjih 12:23, 4 August 2006 (UTC)

Because that's what the settings are. We asked for our import sources to be set to en:wp. If you need to import from other wikis (unlikely), you should propose this on en:wikt. But uploading from your hard drive into a wiki is not what Special:Import is for. Vildricianus 16:45, 5 August 2006 (UTC)
So why does this page specifically say, and I quote, "To import wiki pages from your file, simply click browse to locate the file on your local file system" and then later "If you included history information when you performed the export, then you should also see information about the edits in the 'history' of the imported pages, and in the user contributions"? These make it sound as if exporting and importing are complimentary processes. If it doesn't work this way, why in the WORLD does this page have tons of information reflecting the idea that it does?! Why does it say that we can edit information in the XML files between export and import if that is absolutely impossible? Apparently, Special:Import has absolutely *nothing* to do with Special:Export, and Special:Export is almost completely useless.
Please change this page to reflect the actual workings of Special:Import, since they obviously are not accurately described here. --Cromwellt|talk|contribs 01:08, 29 June 2007 (UTC)
Done.--Patrick 08:45, 29 June 2007 (UTC)


If I import a page, will it prevent a user from registering with a username used in the historey? Minun Spiderman 09:53, 29 September 2006 (UTC)

I've found out that it doesn't cause any harm 9except the contributions will be imported) so no need to reply now, cheers Minun Spiderman 19:42, 1 October 2006 (UTC)

Why MediaWIKI does not wish to import clause containing html?[edit]

I have created xml from html pages. If to replace html with the text that all passes correctly but if to replace the text on html that the program пришет a mistake in syntax of the document. Why and how it to fix?

Page and Category Links[edit]

Why does import function not re-create page links and category links? Though we may move our articles easily I think it does not have much meaning when pages are not linked to categories or pages are not interlinked. -- 12:56, 14 January 2007 (UTC)

See #No_categories_after_import --Dr DBW 01:44, 6 June 2007 (UTC)

What Happens to Previous Content?[edit]

Am I correct in assuming, that when you import a page with the same page name already in the wiki, with a newer timestamp, that the content is over written, and that the previous version is available in the history? Or does the previous version not visible? --Dr DBW 01:49, 6 June 2007 (UTC)

OK, sort of found it out by myself. The previous content is no longer visible using the history tab. However, you can browse through it using the Older revision and Newer revision links if you click on the link to one of the revisions on the history page. --Dr DBW 02:21, 6 June 2007 (UTC)

How to import image files referenced by xml-files?[edit]

Hi - I have a Wiki where as sysop I am trying to load in hundreds of jpg images, and then create the pages via importing an xml containing the descriptions etc. Images are placed in images directory and thumbnails made, but I can't synchronise the imported xml - the new pages don't display the images. To try and rebuild the database links, I've tried: php maintenance\rebuildImages.php >& images.log & and php maintenance\rebuildImages.php --missing >& images.log & This doesn't seem to work. The manual page doesn't really cover image files. Any comments or advice welcome! -- gaudete 10:27, 3 October 2007 (UTC)

Import error message[edit]

I am trying to export a wiki template and import into my media wiki. I receive the error message "Import failed: No pages to import." Any suggestions why it won't find the XML file? I followed all Export directions and have the XML file saved on my C:/ Vineyards (talk) 15:36, 26 April 2012 (UTC)

Import isn't working[edit]

I’m using mediawiki 1.11 and I’m trying to use Special:Import page (logged as admin), but isn’t working...

I created a XML file using Special:Export page from my web site and create using XML creation instruction on Help:Export page. But, when I tried to import this XML, import page shows the message: “Upload of import file failed; perhaps the file is bigger than the allowed upload size. Please export the file from the source wiki using the Special:Export utility, save it to your disk and upload it here. “ Well, the file is too small and it is not working! Just in case, I changed the configuration of PHP to support 20Mb files, as the help page suggest, but still not working. After that, I tried to debug “SpecialImport.php”. I discovered that the first problem is into (line 62, I suppose):

if( WikiError::isError( $source ) ) {
 $wgOut->addWikiText( wfEscapeWikiText( $source->getMessage() ) );

The code “WikiError::isError( $source )” is returning “TRUE” and the import process is finished after it. Just for test, I change the “if” condition for “!isset($source)”, but the page returns an error when I tried to import XML file (“Fatal error: Call to undefined method WikiErrorMsg::readChunk()”. This error is associated with “$chunk = $this->mSource->readChunk();”(on my code, line 429). With it, I decide to stop to debug.

So, I was very excited to use mediawiki on my project. At now, I’m afraid! I need to import a lot of information to mediawiki, but I can’t put this information directly to database and I can’t import it as a XML file. And the terrible news: when I export information using the export tool, I can’t import it back!

What can I do?

Large-scale transfer[edit]

What constitues "a large-scale transfer" and who are the people that can move data within the servers. Is this a workaround for the bug limiting the number of revisions that can be imported? Mike.lifeguard | @en.wb 23:30, 8 November 2007 (UTC)

Yes, it is. This was done a few days ago.  – Mike.lifeguard | @en.wb 19:07, 19 January 2008 (UTC)

user name conflict[edit]

In case of a cross-wiki user name conflict, one may try to export it to a "neutral" wiki on which none of the named users has registered (if that is possible), perform a name-change (to, for example, USERNAME@ENWIKIBOOKS) , and reimport it. Hillgentleman 12:33, 3 March 2008 (UTC)

Additional note: this requires Extension:Renameuser and being a bureaucrat on the intermediate wiki.--Patrick (talk) 13:35, 3 March 2008 (UTC)

how to enable Import?[edit]

I want to enable transwiki imports (from Wikipedia) on my wiki. Where/how do I set that up? ⇔ ChristTrekker 12:25, 20 October 2008 (UTC)

See for documentation:
You need to setup interwiki links to Wikipedia, enable transwiki import source(s), decide where imports should go (if applicable), and make sure you set user rights properly.  — Mike.lifeguard | @en.wb 16:47, 20 October 2008 (UTC)
Thanks! I'll take a look at those references. ⇔ ChristTrekker 06:07, 13 November 2008 (UTC)

Importing articles in customized namespaces[edit]

Some extensions create customized namespaces such as MW:Extension:Semantic MediaWiki, MW:Extension:Semantic Forms. These extensions must not be disabled if the maintenance script importDump.php is run from the command line, otherwise the article name will be in namespace 0 causing name of article errors in the database page table. This relates to this diff --Zven 10:56, 4 December 2008 (UTC)

Gallery tag and xml[edit]

Hi, I'm trying to import an xml file. I'm trying both importDump.php and Special:ImportPages (web). The problem is that the import script for an unknown reason won't recognize the gallery tag <gallery> I'm using to invoke images. Do you have any idea why is this happening? I'm running 1.14.Thanks in advance.--Biris 17:07, 13 July 2009 (UTC)

Commons also as template/page repository[edit]

Hi. Per Bugzilla:4547, there is a high chance that, in the future, all key templates will be on Commons, so that other projects may use. I have read Help:Import, but I do not understand properly. Could someone answer the following questions please?

  1. If a user transfers a page from En.Wiki to Commons, will the exact page history of be on Commons?
  2. If so, will the contributions of En.Wiki by [[:en:wikipedia:user:Example]] be moved to [[:commons:user:Example]]?
  3. If answer to Q2 is yes, then what about those who do not have a global account?
  4. For those without a global account, will a global account be created if it is exported/imported?
  5. If yes to Q4, then what if is the case when the En.Wiki user, and the Commons user, are different users, but with the same username?

--Rehman 04:33, 11 January 2011 (UTC)

As far as I know:
  1. Yes, optionally
  2. Yes
  3. Even if there is no user account, there are user contributions
  4. No
  5. N.a. As mentioned on the page, this is a problem.
--Patrick (talk) 07:27, 11 January 2011 (UTC)
Thanks for the quick reply! For your Answer5: So if someone does move [[:en:wikipedia:user:Example]] contributions to Commons (as part of moving a page with others' contribs as well), and considering User:Example are different people on En.Wiki and Commons, does does that mean [[:commons:user:Example]] would magically get these contributions assigned as theirs? Rehman 08:00, 11 January 2011 (UTC)
Unfortunately, yes. Only indirectly one can try to find out which of the users with the same name made a particular edit, by looking at the importing entry ("n revision(s) from ..") in the revision history of the page.--Patrick (talk) 10:34, 11 January 2011 (UTC)
Thanks a lot for clarifying! I was wondering about these for a long time. Kind regards. Rehman 12:52, 11 January 2011 (UTC)

Sorry, but I have a few more questions:

  1. If the edits from En.Wiki were assigned to a "non-existing" User:Example on Commons, then (in the future, after the import) will it be allowed for someone to create User:Example on Commons, even though it now looks like some edits were already made by that account?
  2. If the above is Yes, account creation is allowed after in import to the username, then in Special:Preferences, what will be the account creation date? The date of the earliest edit, or the date the "account" was created?
  3. For the editor who made the original edits at En.Wik, will those edits be marked as deleted (if so, will it be Restorable?), or will it just be simply "vanished for good"?

--Rehman 09:50, 12 January 2011 (UTC)

I think:
  1. Yes. It could be useful to advice (perhaps with a bot) contributors of a page to be imported, to register on the target wiki.
  2. The date the account was created.
  3. No.
--Patrick (talk) 14:57, 12 January 2011 (UTC)
Thanks! Just tested for "3", seems like it always "copies" and never "moves". Thanks again for your time in clarifying! Rehman 15:10, 12 January 2011 (UTC)

Importing files[edit]

Just like importing a page (with full history) between wikis, would it be possible to import files? That way, when moving media to Commons, we could simply import the whole file and page history from the source wiki, which could be very helpful. Rehman 00:46, 29 January 2011 (UTC)

No, files cannot be imported with Special:Import, you can only import the description page. iAlex 08:52, 29 January 2011 (UTC)
Are there currently any open bugs or discussions on enabling this feature? Rehman 02:07, 30 January 2011 (UTC)
I guess not. New bug at 27082 Oops, already existing at 6071. Rehman 00:34, 1 February 2011 (UTC)

Transwiki from English to Luganda WP[edit]

{{helpme}} Two frustrated admins here. I'm on the English side, trying to get an article to over there, and User:Malangali is trying to import it. Neither of us seem to be getting anywhere. I'm getting "Permission error The action you have requested is limited to users in one of the groups: Administrators, Importers, Transwiki importers." (OK, I'm not a Luganda admin, so this isn't surprising.) Malangali gets "Import pages - No transwiki import sources have been defined and direct history uploads are disabled." Neither of us have been into this sort of thing before and are getting lost. Help?? Please????? Peridon 14:15, 8 November 2011 (UTC)

What page are you trying to import? I'll try it with my steward flag and see if there's something odd going on. fr33kman 17:14, 9 November 2011 (UTC) I'm going to move it into my userspace before the prod expires, but not tonight. This is a fleeting visit while I eat... Peridon 19:44, 9 November 2011 (UTC)
AndeasJS has done it manually - Many thanks to all who've looked at this. Peridon 17:02, 10 November 2011 (UTC)
If you do it manually you probably will not get the history, and them it could be copyright violation... -jkb- 17:37, 10 November 2011 (UTC)

Site "times out" for import[edit]

I was doing just fine importing articles and such from WP until the other day. Then a couple of days ago it started timing out on me ... it would say get to "waiting for" my site and then it would go to the "Problem loading page" ... No import. Any ideas what could be wrong? I am able to move around my site quite nicely otherwise. TopDog

I am having the same issue. Did you manage to get around it ? Euloiix (talk) 17:13, 3 September 2012 (UTC)

XML-Import only for small Files posible[edit]

Hallo, ich have a strange Problem with the Importfunktion and hope somebody kann help me. If i try import an XML-File with a size auf 8kb everything works grate. But if i try ist with a file about 15kb or bigger, i get an Errormessage:

  1. (104)Connection reset by peer: mod_fcgid: can't get data from http client, referer:
  2. (32)Broken pipe: core_output_filter: writing data to the network

The Upload from Images work fine. There ist the max file size 32MB. We use a Wiki-Farm in Drupal-Style (one codebase for more than one instanz), and the error only appears on some instanz. Somebody an Idea ?


How does "include all templates" work?[edit]

When interwiki import is used with the option to import all transcluded templates, does it import only the ones that show up in "View templates on this page", or does it also import pages that are <noinclude> on the transcluded pages (and hence not actually included in the main target)?--Sage Ross (WMF) (talk) 16:51, 31 May 2013 (UTC)

The answer is that it only includes the ones that show up in "View templates on this page" (or at least, it doesn't include "noinclude" templates that are only present on the transcluded pages).--Sage Ross (WMF) (talk) 19:26, 2 June 2013 (UTC)

Template imports from WP?[edit]

I've come across some things like templates which would be useful to have on M.WM -- I could create a new page and copy/paste the current code, but I'd rather do it properly to preserve the lineage.

Why can't normal users do imports?

Why is there no obvious way to request content for transclusion from WP? (If there is, where is it? :) Chris W. (talk | WP profile) 18:13, 22 February 2014 (UTC)

@Christopherwoods: Hello! As an admin, I could do any imports you want, provided there is reasonable justification and the templates will be used. The correct place to request this would probably be on WM:RFH (which is a combination of AN, AIV, UAA, and most other admin/crat noticeboards). Only stewards can grant importer rights here, and they would only do so after local consensus has formed. PiRSquared17 (talk) 16:31, 4 March 2014 (UTC)
I'm not sure whether it is an insult or a compliment to imply that admins are not "normal users". ;) I assure you, we are humans too. But to answer your question: the reason "normal users" (i.e., autoconfirmed users) do not have this right is that it can mess up page history, and template "recursive" imports can really clobber a lot of pages. PiRSquared17 (talk) 16:34, 4 March 2014 (UTC)

Importing pages should be disabled or improved[edit]

It looks very bad when e.g. on the German Wikipedia someone imports a whole article from the Finnish Wikipedia. There is no User:JannE, but interestingly he's made some edits. Also, does this looks good? There is a Finnish article (history of fi-wiki article) on de-wiki. I know that the import tool is that we keep the history, and do not break rules by not referring to author of the text. However I would like to see some better solution, not those ugly page histories and users with contributions, even if user does not exist on the wiki. Btw, what happens if someone will create account on a name which does not exist, but has already edits? Plus I hope that nobody hasn't done this and will never do. --Stryn (talk) 17:52, 4 August 2014 (UTC)

That's just's overuse of the feature. You won't find this problem anywhere else. The solution is to convince them to follow Terms of use#7c. --Nemo 13:22, 11 August 2014 (UTC)
The relevant link is Terms of use#7b, not Terms of use#7c. Go to a Wikipedia page and generate a PDF file and check how well it complies to "7b". It says that attribution may be done using any of these methods:
"Through hyperlink (where possible) or URL to the article to which you contributed (since each article has a history page that lists all authors and editors);"
So attribution can be done by linking to the source article or its history page. It seems that you can't link recursively, though, so all articles need to be listed in the PDF file, and you make use of any links from the article's history page if the history page is not used by the PDF. The PDF file only links to one article (the one from which you generated the PDF file), but that article might also contain content from other articles to which there are no links from the PDF.
"Through hyperlink (where possible) or URL to an alternative, stable online copy that is freely accessible, which conforms with the license, and which provides credit to the authors in a manner equivalent to the credit given on the Project website; or"
This is satisfied, I suppose. However:
"Through a list of all authors (but please note that any list of authors may be filtered to exclude very small or irrelevant contributions)."
The PDF contains a list of authors, and a reader of the document would typically assume that this list is complete (which might not be the case if content has been copied from elsewhere). Because of this problem, it might be irrelevant if the links are licence-compliant as a list of authors makes readers assume that it is irrelevant to follow the link. Also, don't forget about which discusses attribution of File:1986 Ulf Fink 800.jpg. You should consider that some content was contributed before the current terms of use were written. Those contributions are presumably subject to the attribution requirements in the German court ruling, at least if the authors haven't continued editing after the terms of use were approved. --Stefan2 (talk) 00:11, 6 April 2015 (UTC)
No, 7c is correct. We're talking of import here. How is PDF export relevant? It's known that the current PDF exporter doesn't respect copyright (see e.g. phabricator:T75130), irrespective of imports. --Nemo 13:05, 6 April 2015 (UTC)
7c is a contractual agreement between the user who imports the content and the Wikimedia Foundation: if I comply with that section, then I do not violate the terms of use. Whether it violates copyright is a matter between me and the author of the material. If I import licensed content and thereby violate the copyright to that content, then I risk legal problems even if I comply with 7c. I could maybe state that per 7c, the WMF guarantees that correct attribution will be given if I comply with 7c and therefore force the WMF to pay for any fines, should a rights holder manage to fine me despite complying with 7c. 7c is not relevant here as we are talking about requirements in copyright law, not whether someone complies with the terms of use or not.
7b is about licensing of content: I agree that attribution may be given either using the methods in 7b, or using the methods given in the GFDL or CC-BY-SA 3.0. The extra conditions in 7b may only be used if the copyright holder has agreed to the terms of use in the first place. The copyright holder has not agreed to the terms of use if the content has been imported from a third source (for example, a photograph imported from Flickr to Commons), and the copyright holder has not agreed to the terms of use if the copyright holder stopped editing Wikimedia projects before the terms of use were written. If content was contributed before 7b was written, then it is debateable if your choice to continue to contribute to Wikimedia projects automatically makes the old contributions licensed under 7b. If content hasn't been licensed under Terms of use#7b, then the relevant attribution rules are the Landgericht München attribution rules, meaning that linking doesn't provide sufficient attribution.
When content is imported, you need to ensure that correct attribution is given. If correct attribution isn't given somewhere (for example, in the PDF file), then content can't be imported that way. Importing by linking in the edit summary is insufficient as correct attribution isn't given in the PDF file. Importing by using Special:Import is insufficient because content contributed by one user to one project might become attributed to a completely different user at another project who happens to use the same user name. However, Special:Import imports will become sufficient after the SUL finalisation. --Stefan2 (talk) 13:42, 6 April 2015 (UTC)
Your interpretation of 7c (and 7g) is inventive but has no grounding. I maintain that those words mean what they say and what they've always been interpreted to mean since 2009. --Nemo 14:55, 6 April 2015 (UTC)

Moving or rewriting for inclusion in MediaWiki help[edit]

We'd like to make MediaWiki link a help page for Import for all users of all MediaWiki wikis, see gerrit:194418. Currently doesn't have such a help page, so we need to move this or (better) to rewrite it from scratch at at mw:Help:Import. Any volunteer? I don't have time in the coming days to figure out the import of a translatable page like this. --Nemo 15:05, 22 April 2015 (UTC)