The MediaWiki installation on Debian uses a file structure all over the system and symbolic links to enable/disable extensions/configs etc. I understand this is because Debian has preferred locations for user-editable vs. "standard" configs/files etc., and is set up for multi-site capabilities etc.

I want to copy a live mediawiki install over to a local "stage" site on a Virtual machine running Debian. I have the "bare bones" mediawiki running, and have even copied over the MySQL Database with success. However the extensions, skins, images etc. are missing. Since it's a headless server I would like to tarball the files, download them, and extract them to their proper place on the VM - which is non-trivial to do on this system due to the complex/sprawling file heirarchy.

Has anyone done this, and can offer advice, scripts & appropriate tar command (preserving symlinks)? Not sure how to get tar to compress and extract the directories I need with symlinks properly.

The debian mediawiki page describes some of the directories and a bit of the symlinking (confusingly stating that "Most core files from /usr/share/mediawiki are symlinked into this directory"...).

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.