Monday, November 30, 2020
Home Blogging How to Remove the Password Reset / Change option from WordPress

How to Remove the Password Reset / Change option from WordPress

Are you seeking to take away the password reset possibility in WordPress? By default, WordPress permits customers to reset/change password by offering their e mail tackle. Typically you might wish to disable password reset possibility in WordPress. On this article, we’ll present you find out how to take away the password reset / change possibility from WordPress.

Why Take away Password Reset/Change Possibility From WordPress

Should you enable consumer registration in your WordPress website, then password reset possibility permits consumer to recuperate misplaced passwords. Usually, you wouldn’t wish to change that.

Nevertheless, in some utilization eventualities you might wish to take away this feature for particular customers or consumer roles in your WordPress website.

For instance, if in case you have created a short lived account for somebody or if in case you have created a demo website the place customers can login with a demo username and password.

The simpler resolution shall be to only take away the password reset hyperlink. However some savvy customers might already know the URL to entry the password reset type.

Having mentioned that, let’s see how one can simply take away password reset/change possibility from WordPress.

Methodology 1: Disable Password Reset/Change Possibility Utilizing Plugin

The plugin methodology is healthier and simpler. It permits you to disable password reset possibility for particular consumer roles and even particular person customers.

This manner you possibly can nonetheless management and supply password reset function for some trusted customers or consumer roles.

Very first thing you might want to do is set up and activate the Plainview Shield Passwords plugin. For extra particulars, see our step-by-step information on find out how to set up a WordPress plugin.

Upon activation, you might want to go to Settings » Shield Passwords web page to configure the plugin settings.

Merely choose the consumer roles or particular person customers to disable their password change or reset possibility.

There may be additionally an choice to exempt particular person customers. This feature is beneficial if you wish to disable password reset possibility for all customers besides your self.

Don’t neglect to click on on the save adjustments button to retailer your settings.

You possibly can see the plugin in motion by visiting the WordPress login web page and clicking on ‘Misplaced your pass-word?’ hyperlink. It’s going to take you to the password reset web page the place you possibly can strive coming into the username or e mail tackle for a consumer who doesn’t have pass-word reset possibility.

You will note an error indicating that password reset isn’t allowed for this consumer.

Methodology 2: Manually Disable Password Reset Possibility From WordPress

This methodology requires you so as to add code to your WordPress website. It isn’t advisable for newbie degree customers.

Very first thing you might want to do is open a clean textual content file utilizing a textual content editor like Notepad. Paste the next code inside this file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
 * Plugin Name: Disable Password Reset
 * Description: Disable password reset functionality. Only users with administrator role will be able to change passwords from inside admin area.
 * Version: 1.0
 * Author: WPBeginner
 * Author URI: http://wpbeginner.com
 */
 
class Password_Reset_Removed
{
  function __construct()
  {
    add_filter( 'show_password_fields', array( $this, 'disable' ) );
    add_filter( 'allow_password_reset', array( $this, 'disable' ) );
    add_filter( 'gettext',              array( $this, 'remove' ) );
  }
  function disable()
  {
    if ( is_admin() ) {
      $userdata = wp_get_current_user();
      $user = new WP_User($userdata->ID);
      if ( !empty( $user->roles ) && is_array( $user->roles ) && $user->roles[0] == 'administrator' )
        return true;
    }
    return false;
  }
  function remove($text)
  {
    return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') );
  }
}
$pass_reset_removed = new Password_Reset_Removed();
?>

Save this file as disable-password-reset.php in your desktop.

Now you might want to add this file to your WordPress website. You will have an FTP consumer to try this. See our information on find out how to use FTP to add WordPress information.

Hook up with your web site utilizing the FTP consumer after which go to the plugins folder. The plugin’s folder is positioned inside /wp-content/ listing.

Add disable-password-reset.php file out of your pc to the plugins folder in your WordPress website.

You May Also Like : How to Exclude Specific Categories from WordPress RSS Feed

Now you might want to login to your WordPress admin space and go to the plugins web page. You’ll discover a brand new plugin titled ‘Disable Password Reset’ in your record of put in plugins. Click on on the activate hyperlink under the plugin.

That’s all, activating the plugin will disable password reset possibility for all customers together with directors. Directors will be capable to change passwords from the admin space, however they won’t be able to reset password from the login display.

We hope this text helped you learn to take away the password reset/change possibility from WordPress. You may additionally wish to see our record of 13 plugins and suggestions to enhance WordPress admin space.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

How to Signup for Godaddy Affiliate Program & Start Making Money

GoDaddy is likely one of the well-liked model names out there of area and web-hosting. They are well-liked for a numerous cause, and so they...

How To Start Selling Website on Flippa: A Beginner’s Guide To Success

If you may have been working on-line for lengthy and into Website flipping, Flippa is one identify that you need to have heard of. Flippa is a...

How to Fix Your Connection is Not Private Error (Site Owners Guide)

Are you seeing ‘Your connection is not private’ error in your WordPress web site? This is the error message you’ll see on Google Chrome. The...

How to Fix the WordPress White Page of Death (Step by Step)

The WordPress white page of dying is one of the most widespread WordPress errors. It can also be one of the most irritating ones as...

Recent Comments