Title: user_admin_url
Published: April 25, 2014
Last modified: February 24, 2026

---

# user_admin_url( string $path, string $scheme ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#changelog)

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

Retrieves the URL to the admin area for the current user.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/user_admin_url/?output_format=md#parameters)󠁿

 `$path`stringoptional

Path relative to the admin URL. Default empty.

`$scheme`stringoptional

The scheme to use. Default is `'admin'`, which obeys [force_ssl_admin()](https://developer.wordpress.org/reference/functions/force_ssl_admin/)
and [is_ssl()](https://developer.wordpress.org/reference/functions/is_ssl/) . `'
http'` or `'https'` can be passed to force those schemes.

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

 string Admin URL link with optional path appended.

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

    ```php
    function user_admin_url( $path = '', $scheme = 'admin' ) {
    	$url = network_site_url( 'wp-admin/user/', $scheme );

    	if ( $path && is_string( $path ) ) {
    		$url .= ltrim( $path, '/' );
    	}

    	/**
    	 * Filters the user admin URL for the current user.
    	 *
    	 * @since 3.1.0
    	 * @since 5.8.0 The `$scheme` parameter was added.
    	 *
    	 * @param string      $url    The complete URL including scheme and path.
    	 * @param string      $path   Path relative to the URL. Blank string if
    	 *                            no path is specified.
    	 * @param string|null $scheme The scheme to use. Accepts 'http', 'https',
    	 *                            'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
    	 */
    	return apply_filters( 'user_admin_url', $url, $path, $scheme );
    }
    ```

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

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

 [apply_filters( ‘user_admin_url’, string $url, string $path, string|null $scheme )](https://developer.wordpress.org/reference/hooks/user_admin_url/)

Filters the user admin URL for the current user.

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

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

Retrieves the site URL for the current network.

  | 
| [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 | 
| [self_admin_url()](https://developer.wordpress.org/reference/functions/self_admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for either the current site or the network depending on context.

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

Retrieves the URL to the user’s dashboard.

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

Retrieves the URL to the user’s profile editor.

  | 
| [WP_Admin_Bar::initialize()](https://developer.wordpress.org/reference/classes/wp_admin_bar/initialize/)`wp-includes/class-wp-admin-bar.php` |

Initializes the admin bar.

  |

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

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

## User Contributed Notes

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