WP_Upgrader_Skin::request_filesystem_credentials()publicWP 2.8.0

Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem.

Method of the class: WP_Upgrader_Skin{}

No Hooks.


true|false. True on success, false on failure.


$WP_Upgrader_Skin = new WP_Upgrader_Skin();
$WP_Upgrader_Skin->request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
Whether the current request has failed to connect, or an error object.
Default: false
Full path to the directory that is tested for being writable.
Default: ''
Whether to allow Group/World writable.
Default: false



Since 2.8.0 Introduced.
Since 4.6.0 The $context parameter default changed from false to an empty string.

WP_Upgrader_Skin::request_filesystem_credentials() code WP 6.5.4

public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
	$url = $this->options['url'];
	if ( ! $context ) {
		$context = $this->options['context'];
	if ( ! empty( $this->options['nonce'] ) ) {
		$url = wp_nonce_url( $url, $this->options['nonce'] );

	$extra_fields = array();

	return request_filesystem_credentials( $url, '', $error, $context, $extra_fields, $allow_relaxed_file_ownership );