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?
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.
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.
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.
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>
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/
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.
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.
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.
Another option -- if you just want to update via DB change:
update wp_options set option_value=0 where option_name="users_can_register";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With