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.

Commons images
With InstantCommons, most images from commons "just worked". There was one local image on mediawiki.org that I uploaded here, Special:Import of it didn't work.

InstantCommons didn't work at first, the thumbnails were present in /srv/images/ but the image URL complained "/images/thumb/path/to/image.png" not found. This seems related to the multi-wiki support with multiple wiki settings in /Vagrant/settings.d/wikis/, so I disabled mobilefrontend and cirrussearch roles and it worked again.

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. Yet, I don't see the images locally. If I request http://devhub.wmflabs.org/images/thumb/c/c9/Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png/300px-Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png, 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 cirrussearch and mobilefrontend caused problems, these seem to trigger multiwiki behavior and I have a /vagrant/settings.d/wikis/commonswiki/ directory. So I disabled them.

Also a local mediawiki.org image RC_codepen_blahblah.

Roles
The pages on mediawiki.org use roles: Also enable
 * apisandbox, interwiki, parserfunctions, scribunto, translate,
 * add labeledsectiontransclude ?
 * cirrussearch, mobilefrontend