Unable to Locate WordPress Content Directory (wp-content) Problem Fix
- Login CPanel
- Click on ”File Manager”
- locate the file ”wp-config.php”.
- Edit the wp-config.php
- Add the following code anywhere in that file
define( ‘FTP_USER’, ‘userhere’ ); define( ‘FTP_PASS’, ‘passwordhere’ ); define( ‘FTP_HOST’, ‘ftphosthere’ );
Fix this error with WordPress. So when we do a plugin installation so we will get this error where displays that it couldn’t create directory plugin installation is failed so I’ll return to the plugin installer, so let me try to install another plugin into this WordPress as well Let’s say I will try to install the Akismet anti-spam or even the classic editor So you can see that the plugin installations display pretty much the same error, so to fix this we need to go to our cPanel.
So this issue could be related to the folder permission. Go to file manager. You need to find where the wp-content of the WordPress is located so let’s have a look at the issue. So I would right-click on the wp-content and changed the permission of the folder.
755 looks like correct permission for the wp-content, so the issue may not be the wp-content and I will go further Okay it seems that I have found the issue, the plugin folder has been renamed to plugin1, so what I need to do is either to delete this folder or create another plugin folder to the wp-content So I proceeded by deleting the plugin1 folder.
I’ll click on the folder to create a new plugin folder. sorry, so the plugin folder needs to end with S so I will rename these two plugins. Next, I will go back to my website wp-admin panel so from there I go to plugins will try to reinstall the plug-in again.
So click install now or seems pretty good it is installing, so let me activate the plug-in so it seems to be working. So whenever you get this error you usually need to check back to the folder that where your plugin is located check the permission of the folder or the folder may not even exist at all.