How To Disable Password Change Option From WordPress?

disable password change option from wordpress

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 from 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.

function disable_password_change() { return false; }
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.

how to disable password change option from wordpress

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.

by Ravi Chahar

A blogger, web developer, and designer who intend to guide his readers about WordPress, Blogging, Web Development, Web Design and more. I have expertise in WordPress theme development and customization. I can set up and redesign the Thesis themes. I have been working in this field for years now.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge