Support » Fixing WordPress » can’t create directory

  • Resolved eoik



    I suddenly can’t update plugins on my installation, I get an error message that says “can’t create directory”
    but I can update plugins with ftp

    what should I do ?


Viewing 7 replies - 1 through 7 (of 7 total)
  • You have a couple of different options available to you;

    1) Speak to your hosting provider directly and have them set the correct file structure permissions. Depending upon your host they should be able to resolve this issue for you in a few seconds flat. It’s an easy task!

    2) Login via SSH and perform the following commands. (Make sure you’re in the WordPress root directory – the same directory that contains the wp-config.php file).

    CentOS users should do:
    sudo chown apache:apache -R *
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;

    Ubuntu / Debian users should do:
    sudo chown www-data:www-data -R *
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;

    3) Login via FTP and follow the actions on the link below. I would guide you through it here, but that post will do the job.

    [ redacted ]

    • This reply was modified 2 years, 3 months ago by Jan Dembowski.
    • This reply was modified 2 years, 3 months ago by Jan Dembowski. Reason: Removed contact info

    Hi @wordpressmikeuk and many thanks for your answer.

    1) what should I ask OVH exactly? the correct file structure?

    2) ssh : to complicated for me, i’m afraid

    3) with Filezilla, chmod 755 for directories and 644 for files : this I can try.

    last year, we were heavily attacked and i had to reinstall everything. i also changed file permissions. i put 505 for directories and 404 for files. of course, after that, there were many thaings that did not run correctly, so i had to change this for a few directories.
    yesterday, i installed wp latest version. but to do it, i changed the chmod for the entire website, which was not necessary, and turned it to 777.
    after that, i changed it back to 505 and 404.
    and i could not upgrade the plugins anymore.
    so i’v tried several combinations of file permissions on different directories, but without success. the latest combination was 777 on wp-content directory, and 777 on the plugins directory and sub-directory.
    uploads was 767 (!)

    but, i’m now applying what you’ve said.and…. it worked !!!

    what can i say ?! thanks, and thanks, and thanks again !!!

    though now i will have to understand why and how since the 21st of july 210 emails are being sent from the website everyday!
    i suspected MailPoet, so i deactivated it.
    still, 73 mails were sent yesterday…
    so, i clearly have a problem with mailpoet, but…. not only.

    but, that’s clearly another topic….

    Moderator Jan Dembowski


    Forum Moderator and Brute Squad

    Side note to @wordpressmikeuk Please do not use these forum to solicit contacting people. That is explicitly frowned upon.

    Keep support here in the forums.

    @jdembowski If you don’t have anything useful to add to the users support request, please don’t respond at all. I am not using the forums to solicit contacting people. Are you just trying to get your stats up?

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    @wordpressmikeuk – Please review the forum welcome:

    Also please note that we require everyone who posts here to follow guidelines and be respectful of their fellow humans. Following moderators ‘home’ and ‘slapping them with a trout’ is harassment. Stop it.

    I am so beyond frustrated. I have tried for 8 hours today to simply figure out why I cannot install ANY plugins. I have a brand new site with barely anything on it. I just want to start fresh. But I can’t even install the plugin to do that. I keep getting the error message “Installation failed: Cannot locate directory”. I have looked up everything I possibly could but nothing worked. Can anyone give a newbie some advice? I just want to scratch it all.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘can’t create directory’ is closed to new replies.