Incubator:Importing from Incubator
Appearance
(Redirected from Help:Importing from Incubator)
What to do when a subdomain is created?
Do not copy pages from the test at Incubator to the new site. This is illegal. These pages must be imported from Incubator so the edit history of each page is preserved. For this, you have to be member of the global new wiki importers user group (list of members).
Note that it is technically impossible to edit Incubator test wikis for which separate subdomains exist, so you will not miss any page or change while importing.
How to import
[edit source]- Get a list of pages to export from the Incubator. This should include all the test-wiki pages in the Main, Talk, Template, Template_talk, Category, Category_talk, MediaWiki, MediaWiki_talk, Module, and Module_talk namepsaces. The page titles should all start with a project abbreviation and language code, (e.g., "Wp/kab/"), although you can include any non-prefixed templates and modules that you know the test wiki was relying on. You don't have to have any special permissions or even be logged in to do this step.
Ways to accomplish this include:- The normal MediaWiki way (recommended): use Special:Prefixindex on this wiki (or the Multilingual Wikisource, or Wikiversity Beta).
- The API way: go to http://incubator.wikimedia.org/w/api.php and use the appropriate parameters.
- The Catanalysis tool, especially for Wikisource (keep in mind replication lag!)
- Paste the list(s) of page names into a text editor that supports utf-8 and regular expressions. Check for any unneeded parts and remove them.
- Add the page names "Template:INTERWIKI" and "Module:IncubatorInterwikiEXPORT", and copy the full list.
- Paste the list of page names into the field at Special:Export. Check that the list looks complete and correctly formatted.
- Uncheck "Include only the current revision, not the full history". (THIS IS IMPORTANT, because we need the edit history.)
- Click on the "Export" button.
- Save the resulting file on your computer. (Be sure that it supports utf-8.)
- Use the cleaner.py Python script to clean up the resulting XML file. Alternatively, you can do so manually: globally replace the first two parts of each page title, including the slashes (for example: "Wp/kab/") with "" (the empty string) to remove them. This must be done in page titles, links, template transclusions, categories and interwiki links [for non-Wikipedias], for every revision of the page. Failure to do so will result in serious issues that will need the developers to fix!
- Go to Special:Import on the new wiki. You will need appropriate permissions to perform this step. Fill in the Import form:
- Search your computer for the XML file.
- Check the box "Assign edits to local users where the named user exists locally".
- Fill in the "Interwiki prefix:" field:
- If importing from the Incubator, use "incubator:".
- If importing from Multilingual Wikisource, use "oldwikisource:".
- If importing from Beta Wikiversity, use "betawikiversity:".
- Press "Upload file" and wait.
- If you get an error, check Special:Log/import to check whether or not the upload was successful. Sometimes it was, even though you get an error, and sometimes it was only partially successful.
- Check Special:Log/import after each time the importing gives an error. In some cases, the same page may be imported twice, or it will give an error multiple times without importing anything. A solution to this is to manually remove the pages that have already been imported from the XML file, and then try to import it again.
- Be sure the main page is the correct one, and select Special:Random a few times to check for obvious errors. Consider leaving a note on-wiki that users can contact you if something is missing.
- If you imported CSS or JS pages in the MediaWiki namespace, see this comment and the associated Phabricator task.
- Database tables are often incomplete following importing, so run the rebuildall.php script or submit a Phabricator task requesting that it be run on the wiki (add the "Wikimedia-maintenance-script-run" tag to attract the right eyes to the task). You can also run updateArticleCount.php immediately afterwards if you'd like, but there is no need to request that someone else run it, since things should already be set up to run that script daily on the wiki.
- Update Incubator:Site creation log, indicating that importing is finished.
- Consider notifying some of the test-wiki contributors of the new subdomain.
- Wait a few days to make sure there are no missing pages or other problems. Once you are confident there are no problems:
- Ask a steward to add the wiki to the "All existing wikis" WikiSet, if that hasn't already been done.
- Add a notice on the Administrators' noticeboard that the test wiki can be deleted.