User:SPage (WMF)/Duplicating mediawiki.org

We need to prototype and demo the Data and developer hub with a different skin. So set up a labs instance and copy the files.

Need to add interwiki
From Special:WantedPage, I realized interwiki table lacks m, meta, mw, phab, w, wikidata, wikitech Copied from mw.org's Special:Interwiki to local Special:Interwiki.

Importing
$wgImportSources let me "Import from another wiki" directly from mediawiki.org. By checking "Include all templates", I got a lot of dependent templates when I imported API:Data and developer hub

To get additional pages,
 * 1) I visited http://devhub.wmflabs.org/wiki/Special:WantedPages
 * 2) copy the text
 * 3) clean up whitespace, link text.
 * 4) exclude m:, w:, wikitech:, etc. -- these are interwiki prefixes I had not set up
 * 5) paste the list into Special:Export
 * 6) * do include templates, don't include history
 * 7) export as file

Then Special:Import this as "Upload XML data" onto my wiki. Generated a weird title error but imported some stuff.

Also imported Template:MW_version, etc.

Images
Most images are on commons. I added, and my wiki knows they come from there with correct links to upload.wikimedia.org, e.g. File:Wikipedia Beta search on Android 4.4.4 2015-02-09.png.

InstantCommons images broken with multi-wiki setup
Yet, I don't see the images locally. If I requested http://devhub.wmflabs.org/images/thumb/c/c9/Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png, the image URL complained "/images/thumb/path/to/image.png" not found even though the file exists in /srv/mediawiki, I get
 * Error generating thumbnail
 * The source file 'Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png' does not exist. . Permission problem?

It seems  and   caused problems, these seem to trigger multiwiki behavior with multiple wiki settings in /Vagrant/settings.d/wikis/, including a /vagrant/settings.d/wikis/commonswiki/ directory. So I disabled these two roles.

Other images
With InstantCommons, most images from commons "just worked". Some images were only on mediawiki.org. Special:Import doesn't work for these, it imports the page information but not the media file. So wget original file and Special:Upload it, e.g. File:2015-03-16_RCStream_CodePen.png and File:Trail_shoe_rotated.svg

SVG support

Had to add  to , see Manual:Configuring_file_uploads.

Blueprint
I edited Blueprint.php to change the navigation TOC elements to 'Dev:Data and developer hub', etc., and edited src/BlueprintXx to not show the namespace of these links.

Roles
The pages on mediawiki.org use features provided by the following roles: Also enable
 * apisandbox, interwiki, parserfunctions, scribunto, translate, labeledsectiontransclude
 * cirrussearch, mobilefrontend but these caused InstantCommons breakage above