How To Disable Password Change Option From WordPress
May 14th, 2018 | by Ravi Chahar || Leave a comment |
When you forgot WordPress admin password, you could change it from the login page.
Have you ever thought to turn off password recovery option from your WordPress login page? It can be another plus point for WordPress security.
It’s possible that someone can hack your email ID and it would be easy to recover the password of your website using that.
Wouldn’t it be great if you totally disable password change option from WordPress login panel?
Follow The Guide To Remove The Password recovery option.
As you all know, there are many files and folders present in your WordPress directory from which you have to open functions.php file from your theme.
All the functions are controlled by this file.
Whether you use the cPanel or you can directly open this file from WordPress admin panel.
Go to Appearance>>Editor>>functions.php file.
In most of the WordPress themes, the functions.php file consists every code from adding a new sidebar to the footer.
But here you just have to add the code below in the file.
add_filter ( ‘allow_password_reset’, ‘disable_password_change’ );
This simple code will disable the password recovery option. When someone tries to reset the password, a notification will appear that password change is not possible.
After adding this code, you can check on your own website.
Just open the login page and try to reset the password. After filling the email ID, you won’t be approved to change the password.
It’s another way to more secure your WordPress login panel.
Did It Work For You? Do You Have Anything To Say About It?
Most of the people fret when they think about the WordPress codes.
But as you can see the code is simple. If you have a little bit of knowledge about WordPress functions then you can change the name of the function shown above.
In your WordPress theme, you would find the similar kind of codes. The above-shown code will help you to disable password change option from WordPress.
If you still have anything to say, feel free to share your ideas.