Techieshelp.com

MediaWiki Disable Registration

IT Problem

If you have a website that is ran on the mediawiki platform then you will have no doubt come across spam problems either manual or via bots.

One of my sites is also ran on mediawiki and at the moment ive got a big spam issue with bots logging in and posting spam on the wiki. I know this is not the solution long term but I have disabled New User Creation to stop the bots from registering and posting spam until I find really way of stopping the majority of spam….

 

IT Solution

Ok so ill show you two ways of implementing this fix. What we need to do is edit the LocalSettings.php file in the root of your site. I use Dreamweaver but you can use any HTML editor. OK so open your LocalSettings.php file and then go right to the bottom and enter these lines.

 

#disable registration command

$wgGroupPermissions['*' ]['createaccount'] = false;

 

mediawiki disable registration

 

That will hide the register link. The # is purely there so you can find the command to delete or disable by replacing the false with a true statement.

If you do not have a HTML editor and your site is hosted with the cpanel back end you can edit your localsettings.php this way.

Our article below shows you how to edit a file in cpanel, if you already know how to then carry on..

1. Log in to cPanel.

2. Then click on the File Manager icon so you can view the root of your site

3. Go to the  folder icon next public_html folder name

4. Click on the folder where MediaWiki is installed

5. Select LocalSettings.php file

6. Top right you will see options to modify the LocalSettings.php file. Click on Edit File

7. Again enter the below at the bottom of your file.

#disable registration command

$wgGroupPermissions['*' ]['createaccount'] = false;

 

OK, sometimes you may want to leave this permanent but still want new users created. Sys Ops can do this..

 

While logged in as a sys op, go to Special:UserLogin and you will the new account options.

You can pick user’s password yourself, or (better option) enter just user name, and e-mail and click on the ‘send by e-mail’ button (user will get and auto generated password and sent to them via mail)