Skip to content
  • Log In
  • Register
WordPress.org
  • News
  • Download & Extend
    • Get WordPress
    • Themes
    • Patterns
    • Plugins
    • Openverse
    • Mobile
    • Hosting
  • Learn
    • Learn WordPress
    • Documentation
    • Forums
    • WordPress.tv
    • Developers
  • Community
    • Make WordPress
    • WordCamp
    • Meetups
    • Photo Directory
    • Job Board
    • Five for the Future
  • About
    • About WordPress
    • Showcase
    • Gutenberg
    • Enterprise
    • WordPress Swag Store
  • Get WordPress
Get WordPress

Developer Resources

Browse: Home / Reference / Hooks / lostpassword_redirect

apply_filters( 'lostpassword_redirect', string $lostpassword_redirect )

Filters the URL redirected to after submitting the lostpassword/retrievepassword form.

Contents

  • Parameters
  • More Information
  • Source
  • Changelog
  • User Contributed Notes

Parameters

$lostpassword_redirect string
The redirect destination URL.

Top ↑

More Information

  • The lostpassword_redirect filter is used to change the location redirected to after a user requests a password reset. This could be the location set by the “redirect_to” parameter sent to the forgot password page.
  • This filter is to redirect the user following reset of the password. To filter the location of the password reset itself, use lostpassword_url.

Top ↑

Source

File: wp-login.php. View all references

$redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );

View on Trac View on GitHub


Top ↑

Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note
    Contributed by Steven Lin — 2 years ago

    Example migrated from Codex:

    This simple example will redirect a user to the home_url() upon successful password reset.

    add_filter( 'lostpassword_redirect', 'my_redirect_home' );
    
    function my_redirect_home( $lostpassword_redirect ) {
    	return home_url();
    }
    Log in to add feedback

You must log in before being able to contribute a note or feedback.

  • About
  • News
  • Hosting
  • Donate
  • Swag
  • Documentation
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
  • Visit our Instagram account
  • Visit our LinkedIn account
Code is Poetry

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.