This error generally occurs when we host WordPress on a VPS or a dedicated server. You can fix this error by adding the following code into yours wp-config.php File.
define ("FS_METHOD", "direct")
How do you fix the "WordPress asks for FTP details" error? first appeared on InsideHost.