WP asking for hostname and FTP credentials to access admin console

Add the following code in file wp-config.php define(‘FS_METHOD’,’direct’); define(‘FS_CHMOD_DIR’,0755); define(‘FS_CHMOD_FILE’,0644); Just after the line define(‘NONCE_SALT’, ‘XXXXXXXXXXXXXXXXXXXX’);