Plugin Folder and no Access to wp-content

156 views Asked by At

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.

1

There are 1 answers

6
Roshan Khapung On

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

  • Go to AWS LightSail - server's instances and connect through the terminal.
  • You can check your current position by typing the command: ls
  • Now go to the WordPress directory (New Instances: stack/wordpress/wp-content) (Old Instances: apps/wordpress/htdocs/wp-content)
  • Type a command to make a plugins folder: mkdir plugins
  • Check the file permission and ownership of a folder: ls -la plugins It should have file permission as "drwxrwxr-x" which means 775 And ownership should be "bitnami & daemon".
  • You must change as sudo chmod 775 plugins and sudo chown bitnami:daemon plugins
  • If there is a missing index.php file inside the plugins folder then create it and write the missing code also. Also for index.php give the file permission as 664 and ownership to "bitnami & daemon".

In 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.