Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to disable user-registrations completely in Wordpress?

I wonder if there is a way of disable user-registrations completely? I have a client that is really in no need of adding users. For me that would be an extreme measure of security. Of course I must be able to add users through code or similar.

Is there a way of achieving this?

like image 268
bestprogrammerintheworld Avatar asked Mar 19 '14 08:03

bestprogrammerintheworld


People also ask

How do I get rid of login and register on WordPress?

To disable new users registering, login to your site and visit the General Settings page. In the settings page, you'll find the Membership option where you can uncheck the Anyone can register box to disable registration. Uncheck the box and save your settings to disable anyone from registering on your site.

How do I stop spam registrations on WordPress?

To disable spam registration, go to your WordPress dashboard, then navigate to Setting > General. In the General Settings page, scroll down to the Membership option and uncheck the 'Anyone Can Register' box.

How do I enable user registration in WordPress?

Enabling User Registration in WordPress It is turned off by default, but you can easily turn it on. Simply head over to the Settings » General page in your WordPress admin area. Scroll down to the 'Membership' section and check the box next to 'Anyone can register' option. Next you need to select the default user role.


6 Answers

Besides disabling checkbox Settings > General > Anyone can register, you may want to add a simple mod_rewite to your .htaccess @Andrei Gheorghiu is right, Hiding the link to the script does not hide/disable the script.

So, something like that will prevent spam boots to register, return a '403 access denied', and keep your logs lighter

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*(wp-login.php\?action=register).* [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
like image 149
Grashopper Avatar answered Oct 17 '22 00:10

Grashopper


You can disable your user-registration by routing to Settings > General and then do the following:

Search a checkbox that says “Anyone can register” Uncheck this, so nobody can register on your blog. Now when someone accesses the login page, there will no longer be a “Register” link they can use.

http://www.netwebbing.com/wordpress-user-registration-disable/

Also if you still want a registration page, that's kind of secure. Look at the following:

http://www.onextrapixel.com/2013/01/24/how-to-create-an-effective-registration-page-for-wordpress-sign-up/

like image 37
Kees Sonnema Avatar answered Oct 17 '22 00:10

Kees Sonnema


Tried to find a plugin / SO answer to disable user registration completely (as in: prevent bots from registering accounts when Anyone can register is unchecked).

Couldn't find any, so I made this plugin.

like image 35
tao Avatar answered Oct 17 '22 01:10

tao


Didn't want to install an extra plugin if there was a simple way around this (and it felt like there was one).

I simply followed the PHP logic that handles registration, and it seemed to point to a single script:

wp-signup.php

I renamed that script, and I am confident there won't be more attacks. I'll update this post in a couple of weeks.

like image 44
Konstantinos Vasileiadis Avatar answered Oct 17 '22 00:10

Konstantinos Vasileiadis


Another gaping loophole for account creation that I found on our site was created by WooCommerce.

There is an option under:

WooCommerce Settings
Accounts & Privacy
Allow customers to create an account on the "My account" page 

And the default (at least for us) was to have it on.

like image 33
Fred Andrews Avatar answered Oct 17 '22 00:10

Fred Andrews


Another option -- if you just want to update via DB change:

update wp_options set option_value=0 where option_name="users_can_register";
like image 37
tres Avatar answered Oct 16 '22 23:10

tres