0

Good day! Why is it that I am not able to update my plugins in my Wordpress Website.

In my FTP File I have already set my plugins folder to 755 then configured my wp-contents to 755. In my wordpress Site Health, this is what is written in File Permission

The main WordPress directory    Writable
The wp-content directory        Writable
The uploads directory           Writable
The plugins directory           Writable
The themes directory            Writable

I have done everything written in this site and still I can't update any of my plugins. I don't know what is wrong anymore or what should I do.

I am using CWP, with WordPress 5.5.1 and PHP version 7.4.10

Marvin Joseph
  • 31
  • 1
  • 6

1 Answers1

0

One way to solve this problem, trying to change the FTP permissions by the “wp-config.php” file.

There're some steps to fix “Installation failed, could not create directory.” From your web hosting account, open the “File Manager”. Within the root folder, locate the “wp-config.php” file. In your “wp-config.php” file, enter the following passage of code. NOTE: Replace the information in brackets with your information.

define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_BASE’, ‘/pathtorootofyourblog/’);
define(‘FTP_USER’, ‘ftpusername’);
define(‘FTP_PASS’, ‘ftppassword’);
define(‘FTP_HOST’, ‘yoursite.com’);
define(‘FTP_SSL’, false);

Save the “wp-config.php” file. Return to your dashboard and try to install the plugin or upgrade once again. This time, it should be done without any problems.

SENGFAI
  • 65
  • 2
  • 9
  • Hi! I have tried adding the code above but still, I am prompted with the same error. Update failed: Could not create directory. What should I do now? – Marvin Joseph Oct 19 '20 at 06:33
  • Hi! Marvin There's many reasons that cause this error. you can also check this out, https://kinsta.com/knowledgebase/installation-failed-could-not-create-directory . I hope it can help. – SENGFAI Oct 19 '20 at 06:42
  • I am really curious as to why only the plugins/themes folder has issues while my media has none. Anyways. Thank you for your assistance. – Marvin Joseph Oct 19 '20 at 06:50
  • 1
    The most reasons cause it is folder permission. Can you try chown -R _www:_www wp-content, actually on mac is " sudo chown -R _www:_www wp-content ". or step by step: - sudo chown -R www-data:www-data wp-content/plugins/ - sudo chmod 775 wp-content - sudo chown -R www-data:www-data wp-content/ – SENGFAI Oct 19 '20 at 07:02
  • Unfortunately, the user www-data even apache doesn't exist. – Marvin Joseph Oct 19 '20 at 07:28
  • Have you tried to open permission by using teminal on that folder? – SENGFAI Oct 19 '20 at 07:46
  • I have opened permission to the website user. I don't know whether I have to open permission to other users though. – Marvin Joseph Oct 19 '20 at 07:58
  • Can you try to open permission on the folders by terminal? – SENGFAI Oct 21 '20 at 06:20
  • Good day! Here is the output: drwxr-xr-x for root and user for uploads, themes and plugins. – Marvin Joseph Oct 22 '20 at 01:26
  • Have changed it. Status now, drwxrwrr-x but still the not updating – Marvin Joseph Oct 22 '20 at 07:24
  • Can you try to change the permissions of the ‘wp-content’ folder to 777 to make things work then you need to understand that permissions need to be tweaked. after updated you have to change it back to 755. You cannot keep 777 which will allow any user to access the folder. So: $ sudo chown apache:apache -R wp-content This should help out! – SENGFAI Oct 22 '20 at 07:38
  • I have done this earlier and unfortunately it still not updates. I think I have some deeper problem that I am unaware of. Again thanks for the tip I will try to dig deeper as to why this still persists. – Marvin Joseph Oct 29 '20 at 00:53