When you install WordPress on localhost there is a problem with the auto-install plugins that leaves you with a screen like the shown below
This is because file permissions. So what I found after googling for it is that the easiest way to do it is to make a chmod on this directories:
$ chmod 777 wp-content/
$ chmod 777 wp-content/plugins
And then all you need to do is to add the following 3 lines somewhere near the top of your wp-config.php
file:
define( ‘FS_METHOD’, ‘direct’ );
define( ‘FS_CHMOD_DIR’, 0777 );
define( ‘FS_CHMOD_FILE’, 0777 );
Now you should be all set, try to install a plugin and it should fetch the remote file and download it to your wp-content/plugins folder correctly. If you like this article please hit the sharing buttons.