Install Wordpress Plugin on Localhost Easy

Working on localhost has many advantages like fast file loading,acessing all files in IDE.But I was facing the problem that I can not install plugins from plugin backend page.When I try to install plugin a popup came and asked to enter FTP credentials to proceed (the 'Connection Information' screen).

To Resolve this problem, we can add the following code to our wp-config.php so that WordPress use a different filesystem method than FTP.

define('FS_METHOD', 'direct');

Setting the 'FS_METHOD' to 'direct' will also allow us to install themes from the theme panel and update wordpress core file on your local server.