Help talk:Export

From mediawiki.org
Latest comment: 1 year ago by Wladek92 in topic link parse_wiki_text no longer valid

declaration of element contributor in the DTD is not complete[edit]

The declaration of element contributor does not include the case where there is no id nor ip, and instead contributor has "deleted" as an attribute. I came across one instance where neither id nor ip were present.

Getting full list of pages[edit]

The SQL select page_title from wiki_page where page_namespace=0 was from 2007 and does not work now.

select page_title from page where page_namespace=0 -- returns blobs.
However, this works for me -- select CONVERT(page_title using utf8) from `page` where page_namespace=0

--GhostInTheMachine (talk) 11:55, 24 December 2015 (UTC)Reply

My road to update a MediaWiki 1.23 with PostgreSQL 8.4.9 to MediaWiki 1.30 with MariaDB 10.1[edit]

Ordinary update failed (could be that the OS was old). Using PostgreSQL for MediaWiki was a misstake, so I want to use MariaDB. This is how I exported ALL pages (with complete history) from the old wiki and import them into the new wiki.

  1. Read all the steps below before you start!
  2. Installed MediaWiki 1.30 and MariaDB 10.1. Did the basic setup.
  3. Add/change some parameters needed for my export on the "from" wiki (LocalSettings.php)
  4. Add/change some parameters needed for my import on the "target" wiki (php.ini)
    • post_max_size = 100M
    • upload_max_filesize = 100M
    • memory_limit = 512M
  5. Find the name of every page in every namespace in the wiki. The SQL part (after the -c) should work on "any" SQL. The sed part change "|" into ":". The split makes the output into files with maximum 100 wiki pages each.
    • psql -At -U wikiuser -h localhost wikidb -c "with cte (namespace_id, namespace_name) as ( values (0,''),(1,'Talk'),(2,'User'),(3,'User talk'),(4,'Project'),(5,'Project talk'),(6,'File'),(7,'File talk'),(8,'MediaWiki'),(9,'MediaWiki talk'),(10,'Template'),(11,'Template talk'),(12,'Help'),(13,'Help talk'),(14,'Category'),(15,'Category talk')) select cte.namespace_name, x.page_title from cte join mediawiki.page as x on cte.namespace_id = x.page_namespace order by x.page_namespace" | sed 's/\(.\)|/\1:/;s/|//' | split -a 3 --lines=100 -d - all_wiki_pages
  6. For each file from the command above, copy the text into Special:Export and export it. Then rename it with the same number as the input file (so you keep track).
  7. Import the file with Special:Import.
  8. Repeat until all files are exported and imported.

/MikaelLindmark (talk) 15:47, 5 January 2018 (UTC)Reply

Export table made with a template to join data[edit]

Good morning,

I created a table with a lot of columns thanks to a template. I used this template to join data from different pages, thus it contains many different {{#ask:}}. I only found how to export each {{#ask}} when I actually want to export the entire table. Does anyone have a solution for me? Thank you in advance. AnaisBce (talk) 07:49, 31 August 2018 (UTC)Reply

Say how to export entire wiki[edit]

Document how to get every single page of a wiki in one step using Special:Export. (All pages in every namespace.) Jidanni (talk) 04:43, 5 November 2019 (UTC)Reply

Oh. Exporting all the files of a wiki.Jidanni (talk) 04:46, 5 November 2019 (UTC)Reply

Maximum number of titles[edit]

Mention the maximum limit of the number of titles the user can paste into the box. 100? 1000? No limit? If so mention it also. Jidanni (talk) 11:44, 29 November 2019 (UTC)Reply

It's apparently 5000. Why the limit? --67.87.35.128 03:06, 27 February 2022 (UTC)Reply

Feature suggestion: Ability to export edit histories without content[edit]

When implemented, this feature should be accessible through both the Special:Export interface and a HTTP GET URL parameter. 79.241.202.95 18:44, 28 February 2021 (UTC)Reply

I was just looking if anyone else had already suggested this. But I have something to add:

Export tags[edit]

I suggest exports to contain edit tags, like this for example:

 <tags>
  <tag>mobile edit</tag>
  <tag>mobile web edit</tag>
</tags>

Marcus Alanius (talk) 19:53, 30 March 2021 (UTC)Reply

What if page has additional slots[edit]

What happens with content in other slots than the main slot. The Multi-Content Revisions feature enables to define additional slots and store content in those slots. That content is part of the page. So when exporting the page that content should be exported as well, but there is no mention of that in the description of the export feature.

And export is of course related to import, so if/when the content of additional slots is exported, what happens at import. Especially when the slot doesn't exist in the wiki that the page is imported to.

I'm very interested in the current situation and the policy on how to treat export/import with respect to additional slots. AdSvS (talk) 10:10, 11 November 2021 (UTC)Reply

link parse_wiki_text no longer valid[edit]

dead URL : https://github.com/portstrom/parse_wiki_text

Christian 🇫🇷 FR (talk) 11:23, 26 August 2022 (UTC)Reply