I fell into this issue and found a bunch of articles… None of which solved my issue of wordpress asking for ftp.
Here’s the answer!
If you are on a private host (private or dedicated server) all you have to do is add the following line of code to your root config.php page (below all other scripts):
If you are on a shared host, you will need to edit config.php with your server settings in order for it to work:
define( ‘FTP_USER’, ‘yourusername’ );
define( ‘FTP_PASS’, ‘yourpassword’ );
define( ‘FTP_HOST’, ‘localhost or your host ip’ );
If this doesn’t work check into permission settings on your wp-content directory and make sure to set everything in that folder to chmod 777.