Remove Password Lost Link

How To Remove Password Lost Link From WordPress Login Page?

In some of the website’s hacking cases, the hackers use the “lost your password” link to enter your website.

It’s important to put some barriers. What if you totally remove password lost link?

Wouldn’t that be great? It’s because no one would able to reset the password from the login page. It’s an another step to improve the WordPress security.

You should know that you can also restrict the users to change the password. But here, an advance step is required.

You will learn the best way to totally remove that “password reset link”.

Edit The functions.php File of Your WordPress Theme.

If you have a little bit of knowledge about WordPress theme file structure then you would know that functions.php file is responsible for most of the important things of a WordPress theme.

You can edit this file from the cPanel or from the admin panel.

Just go to cPanel>>file manager>>theme folder>>theme name>>functions.php.

Or you can follow the simple process. Login to your WordPres admin panel and go to Appearance>>Editor>>functions.php file.

Just add the code in the file.

function remove_password_link ( $text ) {

if ($text == ‘Lost your password?’){$text = ”;}

return $text;

}

add_filter( ‘gettext’, ‘remove_password_link’ );

And save the file.

Try to open your login page and you won’t see the “lost your password” link.

Whenever you want to change the password, you have to use the cPanel. You can change WordPress password from phpMyAdmin.

For a WordPress website, you should take all the necessary steps to improve the security. It’s because many websites are getting hacked and you won’t like that with your website.

It would be great if you remove password lost link from the login page.

To tighten the security, you can also disable PHP execution, disable directory browsing etc.

There are many other WordPress security tips which can help you to secure your website. You should never provide any vulnerability so that people can create any backdoor.

If you have any doubt, feel free to ask.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.


Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE



2 comments

  1. I’m not sure if wordpress 4.8.1 has changed anything but the code doesn’t work for me as I get a syntax error at the end of the last line

Leave a Reply

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