WordPress asking your FTP credentials to install or update plugins

If WordPress does not have the necessary permissions to modify the directly, Sometimes it may be that WordPress continues to ask the FTP details of your website hosting to install a new plugin or update an existing plugin.

This often has to do with modified permissions on WordPress folders in your hosting plan. The simple solution to fix this:

1) Login to your cPanel
2) Go to File Manager and open the wp-config.php file (Usually located in public_html)
3) Add the following code at the end of the code


4) Now hit Save and exit
5) You are fixed now.