Topic on Project:Support desk

How can i import Wiki dump (*.xml) and related images and templates into my local Wiki

2
Kuninminh (talkcontribs)

I am building an local Wiki for automation test, and i have imported an dump file (*.xml) from dumps.wikimedia.org:

php importDumpphp < dumpfile.xml

php rebuildall.php

After that i can see many pages imported, but the related images and templates don't display as normal online Wiki page.

Anyone please help to overcome this stuck???

Many thanks!

Ciencia Al Poder (talkcontribs)

Dumps don't contain images. You'll need to download them manually. The easiest solution would be to enable InstantCommons, so your wiki fetches images automatically from WikiMedia Commons as they're needed.

About templates, they are included in dumps (unless you have imported a dump that doesn't contain them).

Maybe what you need is to rebuild those pages using refreshLinks.php. This often happens when the page is imported before the template, as they appear in the XML dump. Manually editing and saving those templates/mages may fix that, but refreshLinks.php will take care of that automatically.