When you update the WordPress OR WordPress plugin you have to provide FTP credentials but many times it will not work hence In such situation you have to follow the below article in order to update WordPress OR WordPress plug-in without FTP.
Step1: Open the wp-config.php file from the WordPress site root folder.
Step 2: Paste the code mentioned below and save the file.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
/** Sets up 'direct' method for wordpress, auto update without ftp */
define('FS_METHOD','direct');