On the config.php file:
/*** Updates WordPress without FTP credentials. ***/
define('FS_METHOD','direct');