MediaWiki: How to totally prevent anonymous users from register?
If you are trying to set up a Simple private wiki, this is done by adding the following options to the MediaWiki configuration file LocalSettings.php :
# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
For restricting only editing but not reading, omit the first instruction, leaving in place the last two.
Omit also the last instruction if you want to allow new user registrations.