It’s pretty simple… just edit your WordPress wp-config.php file, adding the following lines:

//* FTP login credentials to stop WordPress asking for FTP details *
define('FTP_HOST', 'ftp.yoursite.com');
define('FTP_USER', 'Your_FTP_Username');
define('FTP_PASS', 'Your_FTP_password');

//*If you can use SFTP SSL connection set this to true*
define('FTP_SSL', true);