How to reduce the MediaWiki engine four times (even almost five) in file size

  • Tutorial
The MediaWiki engine version 1.15.1 contains about 38 megabytes of files.

With a closer look, it is easy to see that of them the contents of the languages ​​/ messages directory (in which translations of the MediaWiki interface into hundreds of different languages ​​of the world, living and dead) are 30 megabytes, and the rest, respectively, is about 8 megabytes.

The development of hosting services in Russia is still not at a particularly high level, so the cost of hosting thirty-eight megabytes of code can differ significantly from the cost of hosting eight and a few megabytes, as you yourself can see when you start choosing a site for the information site. Therefore, the question of how to cut off all languages ​​except the only necessary one from the wiki may be of some interest.

It turns out that the description of the $ wgLanguageCode directive describes a method that allows you to cut down the user's choice of language. After that, it becomes possible to go into the languages ​​/ messages directory in order to kill all unnecessary languages ​​in it - and thereby achieve the desired thing without being selected.

Small wikis can follow this recipe to stay really small.

The comments also say that the English language must also be kept undeleted, even if the main language is assigned to another.

Also popular now: