Change "Forgot Your Password?" link for LDAP login

I’ve got a university client that uses LDAP for all logins and thus needs the Forgot Your Password? link on the wp-login page to actually link to the university credential reset area. Is there a way I can do this without manipulating wp-login? I wrote a custom script like this:




function subdomain_new_location($old) {

return ‘’;



but it doesn’t seem to be working for me now. It worked back before 3.4.


  • Timothy
    • Chief Pigeon

    Hey there.

    You can use this instead:

    add_filter( 'lostpassword_url', 'lostpass_grahamn_url' );
    function lostpass_grahamn_url( $lostpassword_grahamn_url ) {
    return '';

    Use it like the other one you mentioned. Define the path as you need, cowpat is my sandbox install where I test, break and fix things :slight_smile:

    I suppose another option could be a htaccess/regex redirect.

    Take care.

  • aecnu
    • WP Unicorn

    Greetings grahamn,

    Knock, Knock – Housekeeping –> Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that’s great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the ‘Mark as Not Resolved (re-open)’ box below the post area (or else we’ll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.