According to the WordPress Codes FS_METHOD = 'direct'
is chosen when appropriate.
(Primary Preference) “direct” forces it to use Direct File I/O
requests from within PHP, this is fraught with opening up security
issues on poorly configured hosts, This is chosen automatically when
appropriate.
http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants
What is the criteria to be appropriate?
Here’s the code from wp-admin/includes/file.php:
The test appears to be
It only executes this check if we didn’t specify an FS_METHOD ourselves, and if the necessary filesystem calls to check #2 are available. The temporary file is cleaned up afterwards.