Hi Please try to use this in your functions.php it will redirect user to login form when user try to access lost password page:
add_action('init','possibly_redirect');
function possibly_redirect(){
if (isset( $_GET['action'] )){
if ( in_array( $_GET['action'], array('lostpassword', 'retrievepassword') ) ) {
wp_redirect( '/wp-login.php' ); exit;
}
}
}
Or Please follow below approach used from this answer answered here with some details based on comments of @Clarus Dignus
function disable_lost_password() {
if (isset( $_GET['action'] )){
if ( in_array( $_GET['action'], array('lostpassword', 'retrievepassword') ) ) {
wp_redirect( wp_login_url(), 301 );
exit;
}
}
}
add_action( "login_init", "disable_lost_password" );
Related Posts:
- Password change when the user login first time
- Custom login form redirect to external site
- Clarification on auth_redirect()
- How to redirect all requests to wp-login.php?
- Redirect user after login/registration globally
- How to redirect action=register link on the lostpassword page to a different link?
- How to redirect user to specific page based on the input password
- How to auto login after registration? [duplicate]
- Change ‘Back To Website’ link in wp-login.php
- Redirect away from login page
- Redirect when accessing /login when logged in
- Intercept the “lost password” action by first redirecting to an existing instructions page
- Redirect outside WP after login
- wp_login_form redirect problem
- How to redirect wp_login_form to new page after user loged in?
- redirect doesn’t work while using example code
- How to redirect a child page to its parent page?
- Disable redirect to homepage after successful Login, Stay on Current Page
- wp_login_form() redirect same page
- Determine user destination on wp-login.php
- Redirect after login when WordPress in subdirectory
- Login redirects to home page and doesn’t log in
- Custom login-form redirect
- Login Form Redirection
- Redirect user to login and then to page where they came from
- Redirect after user changes password
- How can I redirect the user to the page they were on when they clicked “Lost Password” using “retrieve_password_message” filter
- Redirect after registration and auto login is not working
- PHP header(Location: …): Force URL change in address bar
- What does HTTP/1.1 302 mean exactly?
- php refresh current page?
- How to force a 404 on WordPress
- Disable front end to use as CMS only?
- Redirect Restricted Page to 404
- How to redirect non-logged in users to a specific page?
- How to prevent automatic redirection of 404 errors and “incorrect” URLs?
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- Disable WordPress URL auto complete
- Host the wp-admin on another domain?
- Redirect user to original url after login?
- Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
- When I change slug, will WordPress create redirect from the old URL?
- WordPress localhost site redirect to live site
- WordPress redirecting connections on port 8080 to 80
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- wp_redirect() function is not working
- wordpress redirect after password reset
- Redirect entire website to a single page
- My wordpress multisite homepage redirects to signup page
- Logout redirect to home page
- Disable ONLY URL auto complete, not the whole canonical URL system
- Redirect Localhost wordpress site to dashboard
- Redirect page URL to home URL without using a plugin
- Why is WordPress redirecting from http to https on a local environment?
- Login redirect to previous page
- How to prevent redirect to ‘About’ after core upgrade?
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Why is wp_redirect() preferable to a standard PHP header redirect?
- How do I programmatically generate a 404?
- Redirect to referring page after logging in
- User redirect to destination URL after login
- Prevent access to single post types
- check first time login only
- How to change the default logout link on WordPress Admin
- Stop WordPress from “guessing” redirects for nonexistent URLs
- WordPress install enters an infinite loop
- How to redirect a sucessful registration to a page template?
- How to configure nginx to redirect requests to the uploads directory to the production server?
- WordPress HTTPS redirect loop
- Why am I getting a 301 on a existing post?
- Redirect to dashboard after login
- Make a video post redirect to next post after completion
- Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess
- Non-WordPress page in subdirectory under WordPress page
- Force HTTPS using .htaccess – stuck in redirect loop
- How to redirect after login, the working way?
- Keeps on redirecting on my development copy
- Redirecting WordPress /.htaccess / HSTS / SSL
- 301 redirect not working through .htaccess
- handling login/logout redirects
- Logout/login redirect CSS issue
- Site redirects to wrong url when saving settings
- Implementing global redirection (automatic redirect for all pages who had their slug changed)
- Correct way to hide pseudo pages from being shown?
- Redirect blog page to latest post?
- Redirect to custom url when registration fails?
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- How can I modify the default reset (lost) password email text?
- prevent/block direct access to a thank you page
- Redirect After Delete User in Backend
- Exclude a path from WordPress using .htaccess redirects (Apache)
- Restrict Access to wp-login.php
- How to setup 301 redirects for multiple query string URLs?
- How to redirect url requests to https? [closed]
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- Htaccess redirect from ‘/%postname%.html’ to ‘/%postname%’
- Redirect to post after submission with Gravity Forms? [closed]
- How can I move/redirect single blog posts from one blog to another?
- Best way to handle redirects
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup