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 Restricted Page to 404
- Site redirects to wrong url when saving settings
- Redirect blog page to latest post?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- How to redirect users to custom lostpassword page?
- Links to an exisiting Page are now redirecting to a draft page?
- How to redirect only if page doesn’t exists
- how to do logout redirect to current url
- https multiple redirects
- How to modify the Register link in the login page?
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- Changing “Lost Password Email Link” to custom password reset page
- Redirect a page id url but not the page slug
- Redirect based on parameter in url
- htaccess redirect – replace special character
- Redirect Logged In User if page is wp-login.php and $_Get[‘level’] = X
- Right hook to redirect frontend visitors while respecting rest api plugins to run first?
- Redirect loop after changing nameserver [closed]
- Is it possible to incorporate username in a login redirect?
- How to make wordpress folder (/wordpress) redirect to /?
- How to redirect on login to a specific page if a specific meta user is empty
- Redirecting amp url to non amp url
- How To Redirect /url.html to /url?
- Remove #wpcf7-f2450-o1 with Contact form 7 redirect [closed]
- Redirecting deleted posts url to another WordPress install
- Redirect – remove custom query string
- 301 redirect from old URL structur to new
- Redirect each user to specific pages based on their role
- How to fix too many redirects when enabling SSL for site?
- Add Username to URL for redirect
- Log out and redirect to different URL
- How to get better performance for redirect from domain.tld/35 to domain.tld/full-permalink?
- Redirect deleted page URL ?p=xxxx
- Have WordPress post redirect to url when accesed from iPad (Safari)
- I want to resolve Redirect Chain [closed]
- How to fix URL with pageid example /?p= too many redirection error
- Conditional redirect to several pages
- Display Freebie Page Content only if Referrer is from Form Page
- simple wordpress form redirection
- Redirect to home if page doesn’t exists [duplicate]
- Redirect all links form a category to new links on new category
- My redirect URL doesn’t show any pages on my website [closed]
- Cannot install wordpress, /wp-admin/install.php, inproper redirection [closed]
- How to redirect logged out users to specific page?
- Login redirect shows white page in firefox
- Date based redirects of posts that no longer exist
- redirect wordpress post to new subfolder site on same domain
- 301 all old pages to new location
- How do I share a site only to one User at the time? Please help 🥺🙌
- Re-Direct ALL Users to the Home Page IF not logged in
- Author Archive Page redirecting issue
- Understanding Redirects
- Random redirect to wp-admin/install.php
- How to redirect returning users who previously logged in?
- Page editing in backend redirecting to 404 page not found with url /post.php
- wordpress redirect error in xampp
- Swapping current old site to new WordPress site – need to check I’m doing it right
- how redirect users to custom login page when user comment must “login to reply” is clicked?
- Allow GET request on certain page
- .htaccess redirect for old subfolder installation to new subfolder installation and https
- PHP Mistake – Whats wrong here?
- WordPress update 4.4.1 redirect loop
- Redirecting Issue
- htaccess and redirect to new url using regex
- redirect attachment page to category page
- 301 redirect for wordpress permarlink
- Google PageSpeed: Avoid landing page redirects?
- Redirect to 404.php from single.php
- How to Redirect Url to homepage?
- 404 Not Found with All Cloaking plugins
- Stopping media file redirects
- How to redirect users without permission to view content to a custom page?
- redirect the root of a domain, while leaving the www version unredirected