Cutting the Fat from a MediaWiki Install

Installing a MediaWiki is great, and I try to have a lot of them for different projects. I try to make them as small as possible to avoid using a lot of unwarranted disk space. Here are two quick tips that will take the size of a standard installation from 40 MB to less than  8 MB!

The lowest hanging fruit are languages you don’t care about. If you only want English, then you can delete the 30 MB of  PHP language files in languages/messages/. For me I deleted everything except the ones that started with MessagesEn.

Next thing, choose a template. Make this your default template by editting LocalSettings.php assigning to $wgSkin. Now go into skins/ and open the it’s .deps.php. You can now delete all the unneeded files. So to use just the Simple skin, I deleted everything but Simple.php, Simple.deps.php, and simple/. This frees up about 1 MB.

You can free up about 500 KB by deleting the HISTORY, RELEASE-NOTES, COPYING, UPGRADE. This might also be good for security.

Now you’ve got a 7.7 MB MediaWiki!

No Comments

Post a Comment

Your email is never shared. Required fields are marked *