WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unable to create directory wp-content/uploads (23 posts)

  1. spacebase
    Member
    Posted 1 year ago #

    I am trying to upload media (photos) and get this error message: Unable to create directory wp-content/uploads/2012/11. Is its parent directory writable by the server?

    What do I do?

  2. Here is some info that explains how to modify permissions - http://codex.wordpress.org/Changing_File_Permissions

  3. spacebase
    Member
    Posted 1 year ago #

    I still don't understand if it is something that I need to change in the import.php or related to the portfolio theme I am using.

  4. spacebase
    Member
    Posted 1 year ago #

    I uploaded wordpress in a supdirectory. Now I get this message: Unable to create directory wp-content/uploads/2012/11. Is its parent directory writable by the server?

    I read the file above (thank you Christine, very helpful) and changed a few permissions of some word press files (index.php, uplaod.php)... but I think the permissions must be changed in the parent directory... must I changed the whole root of that directory? Any idea what permissions I need to change and where?

  5. ClaytonJames
    Member
    Posted 1 year ago #

    Change permissions on the /wp-content directory to 0775 and try it again. If it fails, change the permissions to 0777 and try again. Once it is successful, be sure to return the permissions on /wp-content to whatever they were when you started.

    You may also want to put the permissions back on any other files you changed while attempting to resolve the issue.

  6. spacebase
    Member
    Posted 1 year ago #

    Thank you Clayton James!

  7. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome!

  8. ScottyChoc
    Member
    Posted 1 year ago #

    Is it possible to change permissions in a local wordpress environment?

  9. ClaytonJames
    Member
    Posted 1 year ago #

    @ScottyChoc

    You may want to start your own topic and include a few more details, rather than hitching on to a resolved thread, so that others may see actually it; but if your localhost environment is a linux based host, then yes. If it's a windows based host, then running a default account with administrative privileges usually won't require changing permissions. However, Windows ACL's and NTFS permissions can be a pain.

  10. mohhzg
    Member
    Posted 1 year ago #

    I give the same error, when I'm trying to upload a new theme.
    I changed permissions on the wp-content directory to 775 & also 777. Both doesn't work :(

  11. sac65tbird
    Member
    Posted 1 year ago #

    Just a heads up for those with Linux and XAMPP (or possibly other Apache LAMPS)... you don't need to chmod your folders/files - this is a bit of a side effect fix.

    By default XAMPP sets up Apache to use: User=nobody and Group=nogroup. My /wp-content permissions showed User=www-data and Group=www-data. Left like this, well, this is why chmod = 777 is needed....

    Instead, edit Apache's http.conf file and change the User and Group assignments to "www-data" or whatever is correct for your install. Restart Apache. Now new folders/files can be created by WordPress when on the localhost without special folder permissions.

    My file locations:

      /opt/lampp/htdocs/wordpress/wp-content
      /opt/lampp/etc/http.conf

    WordPress 3.5.1, XAMPP Linux 1.8.1, Linux Mint 13 Maya

  12. sac65tbird
    Member
    Posted 1 year ago #

    Well, my suggestion of changing the User and Group within Apache broke my XAMPP after PC restart... XAMPP was installed as root, so starting localhost would get me stuck on the splash screen. I recursively changed the owner:group of the /opt/lamp/htdocs/xampp folder and subfolders to www-data using sudo chown -Rv www-data:www-data /opt/lampp/htdocs/xampp. XAMPP is up and working again.

    So heads up on my "fix".... I still am believing that changing the owner to work with Apache is better than changing file access to everyone - but we'll see!

  13. sac65tbird
    Member
    Posted 1 year ago #

    ...and had to change /opt/lampp/phpmyadmin/config.inc.php to user www-data from root (received error when I clicked on phpmyadmin from the XAMPP main screen).

    I hope that's it, but if you follow my idea, then just heads up when something doesn't work - probably need to change a folder/file's owner and/or group.

  14. j-p8g
    Member
    Posted 1 year ago #

    I went to Settings/Media and unchecked the box that says "Organize my uploads into month- and year-based folders". Seems to have solved the problem.

  15. getrippedmusclefast
    Member
    Posted 1 year ago #

    Error:
    Unable to create directory wp-content/uploads/2012/11

    you need to create /uploads/2012/11 folders in filezilla and add 777 permission to those folders

    Nick
    http://getrippedmusclefast.com/

  16. arthur10
    Member
    Posted 1 year ago #

    @ Clayton James

    Change permissions on the /wp-content directory to 0775 and try it again. If it fails, change the permissions to 0777 and try again. Once it is successful, be sure to return the permissions on /wp-content to whatever they were when you started.

    You may also want to put the permissions back on any other files you changed while attempting to resolve the issue.

    I just want to thank you for your input, it is really appreciated!!! I followed your instructions and it worked for me!

  17. ColletteCM
    Member
    Posted 1 year ago #

    Is there not a way to permanently fix this?? Instead of having to go back and change it afterwards each time you want to upload photos?

  18. cycentum
    Member
    Posted 1 year ago #

    Changing permissions to 777 is very dangerous!!
    Here i provide a good solution!

    http://cycentum.miraiserver.com/en/Memos/WordPressPermission.html

  19. birdsong16
    Member
    Posted 1 year ago #

    Thanks cycentum, that was exactly what I needed!

  20. mjbshaw
    Member
    Posted 10 months ago #

    Do NOT just change file permissions to 0775 or 0777. That's a terrible solution because it introduces several security vulnerabilities.

    The solution mentioned by cycentum works well. Check the user which Apache or Nginx is running as, and make sure the user owns (or has write access to) the folder and files. The user is typically specified in /etc/apache2/envvars (for Apache) or /etc/nginx/nginx.conf (for Nginx).

  21. frankstebbing
    Member
    Posted 10 months ago #

    Hello. As a newbie I'm not sure of the protocol here - but my question seems to be related to the above - but I'm still not understanding how to fix it.

    Mac 10.8.4 user; Xamp installed and running as a local host, default WP 3.6 theme loaded and working locally. When I go to upload my zipped theme (wpex-adapt.zip - 826Kb) I get error: "Unable to create directory wp-content/uploads. Is its parent directory writable by the server?"

    I've been Googling around forums for 6 hours now, but answers either do not work or are too technical for me to action. Thanks in advance...

  22. nk1981
    Member
    Posted 9 months ago #

    I went to Settings/Media and unchecked the box that says "Organize my uploads into month- and year-based folders". Seems to have solved the problem.

    @j-p8g - this worked for me as well.

  23. tommyg73
    Member
    Posted 8 months ago #

    What solved it for me was changing the path.
    The thing for me was that I transfered the site to a different hosting provider (which obviously had different directory structure and site path).
    I searched my PHPMyAdmin for "path" and found the option named "upload_path" and changed it. Now upload works like a charm.

Topic Closed

This topic has been closed to new replies.

About this Topic