WordPress is an interesting platform to build your website but when you get this kind of errors like Unable to install Themes, Plugins localhost, we need to do some settings change to fix it. Here I describes about how I resolved those errors.
I had only problem that I could not install the themes, plugins from the admin panel.
When I try to install a theme/plugin, getting a message like:
“Please enter your FTP credentials to proceed”. You can see ‘Connection Information’ screen. I did not have FTP credentials to install on the localhost.
I fixed that by adding below code in wp-config.php file
Then I returned to admin panel and tried to install it again. Now it was showing another error as:
“Installation fail: Could not create directory”
To fix that error, I set the permissions for the wp-content folder to 777
Now themes and plugins are fully installed.