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

---

# Automatic_Upgrader_Skin::request_filesystem_credentials( bool|WP_Error $error = false, string $context = '', bool $allow_relaxed_file_ownership = false ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#changelog)

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

Determines whether the upgrader needs FTP/SSH details in order to connect to the
filesystem.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/request_filesystem_credentials/?output_format=md#see-also)󠁿

 * [request_filesystem_credentials()](https://developer.wordpress.org/reference/functions/request_filesystem_credentials/)

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

 `$error`bool|[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
optional

Whether the current request has failed to connect, or an error object.

Default:`false`

`$context`stringoptional

Full path to the directory that is tested for being writable.

Default:`''`

`$allow_relaxed_file_ownership`booloptional

Whether to allow Group/World writable.

Default:`false`

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

 bool True on success, false on failure.

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

    ```php
    public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
    	if ( $context ) {
    		$this->options['context'] = $context;
    	}
    	/*
    	 * TODO: Fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version.
    	 * This will output a credentials form in event of failure. We don't want that, so just hide with a buffer.
    	 */
    	ob_start();
    	$result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
    	ob_end_clean();
    	return $result;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-automatic-upgrader-skin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-automatic-upgrader-skin.php#L40)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-automatic-upgrader-skin.php#L40-L52)

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

| Uses | Description | 
| [WP_Upgrader_Skin::request_filesystem_credentials()](https://developer.wordpress.org/reference/classes/wp_upgrader_skin/request_filesystem_credentials/)`wp-admin/includes/class-wp-upgrader-skin.php` |

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

  |

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

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | The `$context` parameter default changed from `false` to an empty string. | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## User Contributed Notes

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