WordPress sometimes requests ftp credentials to enter for installing a plugin. We face this issue when we try to manually install wordpress on ubuntu machines.
Since FTP credentials are separate from wordpress admin username and password. One way having this feature will ensure no plugins are installed by administrators to whom we give control to manage the website.
But, if you are the only administrator for the website and I am sure it is very annoying for us to enter FTP username and password each time we want to make an update to a plugin or installing plugin.
In order to avoid that, all you need to do is put the below line of code in your
wp-config.php file which is located at the same level of wp-admin directory
Hope this solves the problem.