Manual:Skin autodiscovery

Skin autodiscovery was a legacy skin installation mechanism used by MediaWiki since very early versions (around 2004) which will be removed in MediaWiki 1.25, after being superseded by an explicit installation method in MediaWiki 1.12 and after being officially deprecated in MediaWiki 1.23.

MediaWiki 1.23 and 1.24 will emit warnings in production if a skin using the deprecated mechanism is found. This has been added after the release of 1.23-rc2 and will be part of the final release. --Christopher

Skins using autodiscovery will continue working in the 1.23 LTS release (with the aforementioned warnings) and support for them will be removed in 1.27 LTS, giving you plenty of time to migrate.

How did it work?
It used to be possible to just put a  file in MediaWiki's   directory, which would be loaded and expected to contain the   class. It has been discouraged for a long time because of the limitations of this method (inability to add localisation messages, ResourceLoader modules, etc.) and awkwardness in managing such skins ($wgSkipSkins had to be introduced to make it possible to disable an installed skin).

What's the right way?
The recommended way to create a skin is detailed on Manual:Skinning.

In short, you would create a subdirectory under  containing your skin's PHP code and assets, define certain skin properties in the   file in that subdirectory, and   it like you do when installing extensions.

This has already been supported, with minor modifications, since MediaWiki 1.12.

Migration guide
If your skin was not written by yourself, first try to find out if it was updated. Most of the skins that have description pages here (Category:All skins) use the new mechanism already or will be updated to use it soon (before 1.25 is release).

As mentioned above, the "migrated" skins will work with your MediaWiki 1.23 installation, as well as many versions back.

To switch a skin to the new mechanism, in short:
 * Move the MySkin.php file into the MySkin directory with skin resources (or create one if it doesn't exist). Skins often use camel-case for the PHP file name and lower-case for the directory – you should make both names exactly the same (doesn't matter which way, just be consistent; we advice you to use ...).
 * Adjust paths in the PHP file if they were relative to file's directory, rather than $IP or $wgStyleDirectory.
 * Add the skin to $wgValidSkinNames in the Myskin.php file, like so: . Note the capitalisation (first one is lower-case, second one is camel-case).
 * Add a  (or  ) to your LocalSettings.php file (similarly to how it's done for extensions).