Support » Fixing WordPress » How do I upload a photo?

  • Resolved sherrylin


    When i tried to upload a photo, there was an error message:

    Unable to create directory /home/virtual/site21/fst/var/www/html/wp-content/uploads. Is its parent directory writable by the server?

    How should I solve this problem?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Does your “uploads” folder already exist? I had a similar problem when I aborted the upload (i.e., the folder with the uploaded file existed but the entry wasn’t in the database yet) and then tried to upload the picture again. Delete everything in your upload gallery (if you are only in the test process, of course) and delete all subfolders from “uploads”. Then try it again.


    You need to change the permissions for the wp-content directory so that it can be written to.

    Well, I know for sure that I had extactly the same problem with the “uploads” folder having write permissions for “owner” (and that’s sufficient).

    I would not set write permissions for “group”.

    Thank you.

    I’ve changed the permission, but the same error message still appear…

    what should I do ??

    This worked for me:

    I still assume you are in the set-up phase for WP 2.0 and that you know how to use ftp-clients.

    Delete all pictures from the post interface in WP (i.e., in the picture browser) and delete the directory “uploads” and all of its subdirectories and files via ftp.

    Now create your “uploads” directory manually as a subfolder of “wp-content”. chmod this directory “uploads” to 750 (i.e., set permissions to rwxr-x—).

    Try again to upload a picture, it should work now.

    Note that there are other permission issues when using the upload picture function. For example, see


    Moderator James Huff


    Volunteer Moderator 🚀

    Sherrylin, what numerical value did you change the permissions to?

    chmod -R 777 uploads

    It’ll work well.

    777 is insecure and not necessary

    Moderator James Huff


    Volunteer Moderator 🚀

    777 is necessary on most server configurations. Yes, it is insecure, but required by most server configurations in order to use the internal cache and upload features, and the backup plugin. So, in case something happens, keep regular backups (at least weekly) on your local computer.

    can you explain which (bad) configurations and why?

    Moderator James Huff


    Volunteer Moderator 🚀

    Any configuration that I have encountered running PHP as an Apache module has required 777 for directories to be writable by Apache. Server configurations using PHP-as-CGI (a minority configuration) can use more secure permission settings.

    Ok , that’s right.

    I can only change the permission of ‘upload’ folder. when i want to change the folder ‘2006’ there was an error message;

    Error -142: remote chmod failed

    what does that mean?

    thank you.

    this seems to be a general problem, I think.

    I couldn’t resolve it with the tips given here, it’s always the same answer, no matter what permissions I give, from 750 to 777:
    “Unable to create directory …/blog/wp-content/uploads/2006. Is …/blog/wp-content/uploads writable?”

    I then tried to create the categories manually and gave tem all permission 777, the answer is this:
    “Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1255 is not allowed to access …/blog/wp-content/uploads/2006/01 owned by uid 30 in …/blog/wp-admin/admin-functions.php on line 1757”

    why aren’t we able to set the upload folder manually like before? i’ve quite a lot of pictures and had my own archiving system.

    I just found out that the SAFE Mode Restriction is set by my web-host. I’ll have to write a mail asking to deactivate it, and if he doesn’t want to, no image uploading. boring.

    but never mind, i just found out that IImage Browser has a wordpress 2 compatible plugin that serves all my needs:

    one just has to deactivate the WYSIWYG editor to see the quicktag.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How do I upload a photo?’ is closed to new replies.