I had the plugin WP File Manager in the wordpress plugin area, so I searched for a solution in order to solve another problem. I found one solution and it was to change the name of the folder plugin and then change it again, when I changed I lost all my plugins. I do not have an issue redownloading my plugins BUT now because I mistakenly deleted the whole [Plugins] folder instead of just the one plugin, when I try to install any plugins now I get the error message ‘Installation failed: Could not create directory.’
So I have clearly deleted a directory and I know I should go to the original cpanel or file system to fix it, the problem is I don’t have access to that. Is there any chance I can fix it?
And I don't know where exactly is located my website, I have a domain and hosting files in Bluehost and also have an Instance in AWS and Lightsail and Bitnami is also involved in wordpress I can see the directory path starting with opt/bitnami/wordpress.
I have try everything to log into the server, key files, ssh access terminal coding, everything and nothing helps.
It looks like by deleting the plugin's folder you got into trouble and you may also have file permission and ownership issues inside the WordPress directory. So you got the error like "Installation failed: Could not create directory."
If you are using AWS LightSail, there are different options to connect to SSH
lsmkdir pluginsls -la pluginsIt should have file permission as "drwxrwxr-x" which means 775 And ownership should be "bitnami & daemon".sudo chmod 775 pluginsandsudo chown bitnami:daemon pluginsIn this way, you can re-create the plugins folder manually from the terminal but you can also use FileZilla where you can use an SSH key to connect, you will get a clear file directory and you can view/change the file permission but for ownership use terminal.
Check the wp-content directory folder's file permission and ownership also. Understand the server and WordPress file structure and their file permission.