Skip to content

How To Remove Lost Password Link From WordPress Login Page

In this tutorial, I’ll teach you how to remove lost password link from WordPress login page. This will just remove the lost password link from the login page of your WordPress but users can still access to the lost/reset password form by visiting the link directly and reset their password. However, you can also disable lost password feature by following this article.

Just add the following snippet to your current theme’s functions.php file:

function remove_lost_your_password($text) { return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') ); } add_filter( 'gettext', 'remove_lost_your_password' );
Code language: PHP (php)