function wp_lostpassword_url( $redirect = '' ) {}

Returns the Lost Password URL.
Returns the URL that allows the user to retrieve the lost password


  • string $redirect: Path to redirect to on login.

Defined filters

  • lostpassword_url
    apply_filters( 'lostpassword_url', $lostpassword_url, $redirect )

Source code

function wp_lostpassword_url( $redirect = '' ) {

	$args = array( 'action' => 'lostpassword' );

	if ( !empty($redirect) ) {

		$args['redirect_to'] = $redirect;


	$lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );

	return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: