Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Change User Rights in MediaWiki

MediaWiki is the software behind Wikipedia. This guide shows how to give a user more rights, or take rights away.

CMS and Apps2 min read12 steps

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.

GroupWhat it can do
userEvery logged-in person. Can edit pages.
bureaucratCan change the groups of other users.
sysop (administrator)Can delete pages, block users and protect pages.
interface-adminCan 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.

  1. Log in to your wiki.
  2. Search for Special:UserRights in the search box, or add /index.php?title=Special:UserRights to your wiki address.
  3. Type the user name and click Edit user groups.
  4. Tick the groups you want to add.
  5. Untick groups you want to remove.
  6. Add a short reason in the box.
  7. 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.

  1. Log in to cPanel and open File Manager.
  2. Find LocalSettings.php in your wiki folder.
  3. Right-click it and choose Edit.
  4. Go to the bottom and add a line.
  5. 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;
Tip: Give only the rights a person needs. Fewer administrators means a safer wiki.

Quick recap

  • Rights are bundled into groups.
  • Use Special:UserRights to change one user.
  • Use LocalSettings.php to change rights for a whole group.
  • Back up the file before you edit it.
  • Give people the lowest rights they need.