What are user groups?
A privilege is a thing a user is allowed to do. MediaWiki bundles privileges into groups. A user who is in a group gets all that group's rights. This is like a school: students, prefects and teachers can each do different things.
| Group | What it can do |
|---|---|
| user | Every logged-in person. Can edit pages. |
| bureaucrat | Can change the groups of other users. |
| sysop (administrator) | Can delete pages, block users and protect pages. |
| interface-admin | Can edit site-wide CSS and JavaScript. |
Groups can differ between versions and settings.
Change rights from the wiki
You must be a bureaucrat. The first account made during install usually is.
- Log in to your wiki.
- Search for Special:UserRights in the search box, or add
/index.php?title=Special:UserRightsto your wiki address. - Type the user name and click Edit user groups.
- Tick the groups you want to add.
- Untick groups you want to remove.
- Add a short reason in the box.
- Click Save user groups.
Change rights for everyone
You can also change what a whole group may do. This is done in a file called LocalSettings.php. It sits in the main folder of your wiki.
Warning: A mistake in this file can make the wiki show a blank page. Download a copy before you edit.
- Log in to cPanel and open File Manager.
- Find
LocalSettings.phpin your wiki folder. - Right-click it and choose Edit.
- Go to the bottom and add a line.
- Save the file and reload your wiki.
For example, this line stops anonymous visitors from editing:
$wgGroupPermissions['*']['edit'] = false;
The star means everyone who is not logged in. The word edit is the right. false turns it off.
To stop new accounts from being created by guests, use this line:
$wgGroupPermissions['*']['createaccount'] = false;
Quick recap
- Rights are bundled into groups.
- Use Special:UserRights to change one user.
- Use
LocalSettings.phpto change rights for a whole group. - Back up the file before you edit it.
- Give people the lowest rights they need.