I would like to redirect the default wordpress password reset url /end-point. So the url before the password is reset.


redirect to /password-reset/ (which is aalready setup)

I have created a custom page, so any user querying the old url will be redirected to the new page.


1 Answer 1


There is a filter to change the lost password url. Try this :

add_filter( 'lostpassword_url',  'my_lostpassword_url', 10, 0 );
function my_lostpassword_url() {
    return site_url('/password-reset/');

Note : You can place code in functions.php or make plugin (Recommended).

  • Thank you very much! This change the global hook and works. My only issue is that if anything else references the old url, then i need that to redirect.
    – Stefano
    Dec 6, 2016 at 10:22
  • As I understand now,You want redirect if some one access url it go to new url Dec 6, 2016 at 10:23
  • @Stefano Please use this plugin : wordpress.org/plugins/redirection Dec 6, 2016 at 10:26