We continue to develop resources related to the COVID-19 pandemic. See COVID-19 initiatives on Appropedia for more information.
Appropedia:Importing wiki pages
What to import?
Please note that any such page on with some kind of value in environmental, design or development issues is welcome to be transwikied to Appropedia.
An Appropedia admin would be needed to do the import function, but for small tasks where history is not needed, it's enough to copy the page into Appropedia, and add an attribution notice. The author or site must be credited in an attribution statement at the bottom of the page, or the author can add the page themselves.
Often Wikipedia pages are deleted, but would actually be welcome in Appropedia. Some Wikipedia admins are helpful if the page has already been deleted - contact one of them here: Wikipedia:Category:Wikipedia administrators who will provide copies of deleted articles. (Try one and be patient, but if there is no response, try another one.)
With or without history
For stable wikis that are expected to be around for a long time, especially where the edit history of the page is likely to be long, we don't usually import the history. The attribution template used will refer the reader to the history tab on the original page.
Editing usernames before import
In cases where the history is imported, User Usernames can be edited (with a mass search and replace) in the XML document before importing, to ensure that the correct user is credited.
This is one disadvantage of Special:Import, if not handled carefully. If you import something written by a user that does not have an account, the page history will link to special:contributions/user name as though “user name” was an unregistered user. The problems are that 1. it is not clear who this contributor is, and 2. if anyone later makes an account called “user name”, they get assigned all of those edits, which they might not have made. Both of these are problems in terms of the open license we use on Appropedia.
This has happened in Appropedia with pages imported from other wikis following mergers, and elsewhere with with MediaWiki help pages that get imported into external wikis.
How to fix this by editing the XML import file:
- Rename everyone to something of the form "User name @ sourcewikiurl.org" (sourcewikiurl.org standing for the wiki where the content came from). As @ isn’t allowed in user names, no one can register and claim those edits as their own. It works as long as people don’t later make an account and get upset that those edits are not contributing towards their edit count!
- If importing the user database, it's not necessary to use forbidden characters such as @. As we haven't tried yet, we're not even sure this won't cause problems with those users logging in, it's probably best to avoid this - e.g. use "User name (sourcewikiurl.org)"
- Remember to also rewrite usernames in talk signatures - i.e. [[User:Foo...]] and [[User talk:Foo...]]
In any history or contributions page, the modified user name will to link to a non-existent pagebut at least the contributions won't be falsely attributed.
See also the bug report (still open on 24 Oct 2009).
From Wikipedia:Project:WikiProject Transwiki/exporting #How to export - given for reference only (we usually don't have to worry about pages with >1000 revisions):
Do not use Special:Export, as it will only return 1000 revisions at a time, and some of the other documented features do not currently work.
- Instead, use
- Save the file as something.xml
- Use a find/replace feature of a text editor and find all "
</username>" and replace it with "
- Save. You should now be ready to import the file via Special:Import on another MediaWiki wiki.
So, e.g. for English Wikipedia articles:
Be sure to adapt as appropriate to whichever wiki you're importing from.
(Note there are other ways this could be done, but this seems to be the standard, so it's probably the best way to minimize confusion.)
Importing images from another wiki
The method above will export only the text of the wiki pages. To import images:
- Note that the image pages can be imported as above, with any information they contain about licensing, source, etc.
- Importing the images is either:
- Done manually - downloading each image and then uploading on the target wiki. This is tedious if more than half a dozen images.
- Done on the server side - see and this answer on StackOverflow (look for the step-by-step single procedure. (Also see mw:Manual:importImages.php and Mediawiki: How to export a subset of pages including images.)
- The idea for editing the XML comes from Angela at Edits in unexpected places.
- Another question then is if we want to change the name later (e.g. someone wants their old contributions elsewhere merged into their new account on Appropedia). It seems like mw:Extension:User Merge and Delete will let us do that.