By default, if you want to install plugins or upgrade WordPress, you have to provide the FTP details. If you are running WordPress on localhost, you won’t have the FTP credentials. In this case you won’t be able to install plugins or upgrade WordPress. There is a way to configure WP to don’t use FTP, instead install directly using the Read/Write permission of folder.
If WordPress can’t install anything without FTP, it needs another method – direct install. WP will download the required files in a ZIP archive format, extract it to the plugins directory. But WP can’t just move/copy files to a directory of your WP root with out permissions. So you have to change the permissions of your WP root.
... [READ MORE]