WordPress : Asking FTP credentials when trying to install a plugin or theme
Since the files are not getting access you are prompted with FTP credentials.
There are 2 options to follow :
- Provide the FTP credentials inside /wp-config.php file :
define( 'FTP_USER', 'username' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'ftp.example.com:21' );
- By Pass the check as show in the SO post :
Can I install/update WordPress plugins without providing FTP access?
The easiest way to solve this problem is add the following code in your wp-config.php
define('FS_METHOD', 'direct');
If still problem exists, follow the steps given by following link :