Title: wp_print_request_filesystem_credentials_modal
Published: April 23, 2015
Last modified: May 20, 2026

---

# wp_print_request_filesystem_credentials_modal()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/wp_print_request_filesystem_credentials_modal/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_print_request_filesystem_credentials_modal/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_print_request_filesystem_credentials_modal/?output_format=md#changelog)

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

Prints the filesystem credentials modal when needed.

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

    ```php
    function wp_print_request_filesystem_credentials_modal() {
    	$filesystem_method = get_filesystem_method();

    	ob_start();
    	$filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
    	ob_end_clean();

    	$request_filesystem_credentials = ( 'direct' !== $filesystem_method && ! $filesystem_credentials_are_stored );
    	if ( ! $request_filesystem_credentials ) {
    		return;
    	}
    	?>
    	<div id="request-filesystem-credentials-dialog" class="notification-dialog-wrap request-filesystem-credentials-dialog">
    		<div class="notification-dialog-background"></div>
    		<div class="notification-dialog" role="dialog" aria-labelledby="request-filesystem-credentials-title" tabindex="0">
    			<div class="request-filesystem-credentials-dialog-content">
    				<?php request_filesystem_credentials( site_url() ); ?>
    			</div>
    		</div>
    	</div>
    	<?php
    }
    ```

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

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

| Uses | Description | 
| [get_filesystem_method()](https://developer.wordpress.org/reference/functions/get_filesystem_method/)`wp-admin/includes/file.php` |

Determines which method to use for reading, writing, modifying, or deleting files on the filesystem.

  | 
| [request_filesystem_credentials()](https://developer.wordpress.org/reference/functions/request_filesystem_credentials/)`wp-admin/includes/file.php` |

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

  | 
| [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.

  | 
| [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.

  |

| Used by | Description | 
| [install_plugin_information()](https://developer.wordpress.org/reference/functions/install_plugin_information/)`wp-admin/includes/plugin-install.php` |

Displays plugin information in dialog box form.

  |

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

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

## User Contributed Notes

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