Title: wp_registration_url
Published: April 25, 2014
Last modified: May 20, 2026

---

# wp_registration_url(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#wp--skip-link--target)

Returns the URL that allows the user to register on the site.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#return)󠁿

 string User registration URL.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#source)󠁿

    ```php
    function wp_registration_url() {
    	/**
    	 * Filters the user registration URL.
    	 *
    	 * @since 3.6.0
    	 *
    	 * @param string $register The user registration URL.
    	 */
    	return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/general-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/general-template.php#L477)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/general-template.php#L477-L486)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#hooks)󠁿

 [apply_filters( ‘register_url’, string $register )](https://developer.wordpress.org/reference/hooks/register_url/)

Filters the user registration URL.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#related)󠁿

| Uses | Description | 
| [site_url()](https://developer.wordpress.org/reference/functions/site_url/)`wp-includes/link-template.php` |

Retrieves the URL for the current site where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [wp_register()](https://developer.wordpress.org/reference/functions/wp_register/)`wp-includes/general-template.php` |

Displays the Registration or Admin link.

  | 
| [redirect_canonical()](https://developer.wordpress.org/reference/functions/redirect_canonical/)`wp-includes/canonical.php` |

Redirects incoming links to the proper URL based on the site url.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/wp_registration_url/?output_format=md#comment-content-725)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/wp_registration_url/#comment-725)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_registration_url%2F%23comment-725)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_registration_url%2F%23comment-725)
 4. **Sample Registration Link**
 5.     ```php
        <a href="<?php echo esc_url( wp_registration_url() ); ?>"><?php esc_html_e( 'Register', 'textdomain' ); ?></a>
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_registration_url%2F%3Freplytocom%3D725%23feedback-editor-725)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_registration_url%2F)
before being able to contribute a note or feedback.