WP-admin plugin installation via FTP silently fails on shared hosting

Well once again I posted too soon and figured out the solution shortly after. What worked for me was adding this to my wp-config.php file:

define('FS_METHOD', 'ftpsockets');

The above line tries to force WordPress to use the PHP Sockets class when working with the filesystem – updating, installing etc.


For security concerns on shared hosting you should not store your FTP username and password in your wp-config.php file. So REMOVE these lines asap in case you are using them:

define("FTP_USER", "ftp_username"); // Substituted by real values obviously
define("FTP_PASS", "ftp_passs");