When you install MediaWiki it allows new accounts creation out of the box.
This is not always the behaviour I want. Unfortunately there isn’t an option to disable it from the classic menu “my preferences”.
In fact, to disable it, a line of code needs to be added in the configuration file “LocalSettings.php”:
$wgGroupPermissions['*']['createaccount'] = false;
Done!