WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Unable to create directory wp-content/uploads

[Resolved] Unable to create directory wp-content/uploads

  • 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?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Christine Rondeau

    @crondeau

    Volunteer Forum Moderator

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

    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.

    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?

    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.

    Thank you Clayton James!

    You’re welcome!

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

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

    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 🙁

    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

    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!

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

    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.

    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/

    @ 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!

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] Unable to create directory wp-content/uploads’ is closed to new replies.