Manual:Preventing access


 * In order to prevent new user registrations, the following line could be added to the LocalSettings.php file:


 * $wgWhitelistAccount = array ( "sysop" => 1, "developer" => 1 );


 * Note: New users will still be able to be created by sysops, in the following manner:


 * Go to Special:Userlogin, when logged in as a sysop. Enter a username and an email address, and click the "by email" button.  The account will be created with a random password which is then emailed to the given address.


 * By adding the following line to LocalSettings.php, it is possible to entirely disable anonymous editions:


 * $wgWhitelistEdit = true;


 * If you want anonymous users not to be able to read or edit your MediaWiki, add this line to your LocalSettings.php:
 * # Pages anonymous (not-logged-in) users may see
 * $wgWhitelistRead = array ("Main Page", "Special:Userlogin", "Wikipedia:Help");
 * This way anonymous users can only see the Main Page, the user login page and the help page.
 * Caution: if your MediaWiki is in a language different than English, you need to translate the titles in the array. For instance, in Spanish the line will look like this one:
 * $wgWhitelistRead = array ("Portada", "Especial:Userlogin", "MiWiki:Ayuda");


 * You may find more information about user access restriction on Setting_user_rights_in_MediaWiki


 * To prevent a special page from being listed at Special:Specialpages, edit SpecialPage.php and change the relevant entry to be an instance of UnlistedSpecialPage instead of SpecialPage.


 * Question: I want to be tyrannical (just registered users can edit) on the page itself, but still allow general access to Discuss this page/Post a comment. Can this be done?

Next page: FAQ >