permissions - ftp_nlist() and ftp_pwd() warnings - WordPress Development Stack Exchange
The solution
is just to add define('FS_METHOD', 'direct');
Just take a little precaution! This requires adding require_once( ABSPATH . 'wp-settings.php' ); before. Why? Again, no idea. However, this is a requirement for multiple configurations, as you can see by editing the wp-config.php documentation page