Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using wordpress 3,8.

When a user visit /wp-login.php?action=lostpassword and clicks "retrive password"

i would like do redirect them to /index.php instead of the login window.

Is it possible?



share|improve this question

1 Answer 1

Use the lostpassword_redirect filter:

add_filter( 'lostpassword_redirect', 'wpse127373_lostpassword_redirect' );
function wpse127373_lostpassword_redirect() {
    return home_url();  // use the home URL for your site

Add this code to your active theme's functions.php file or -- if you want it to persists across theme changes -- add it to a custom plugin.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.