4
votes

I have a wordpress website online. In the local version I had put a logo picture which now has disappeared. Therefore I tried to upload the logo again via the standard wordpress image upload tool.

I get the following error message:

Unable to create directory wp-content/uploads/2014/01. Is its parent directory writable by the server?

How can I solve the problem?

UPDATE: Problem solved

Thank you to everyone for their input. Here is what I did:

  • In my database in wp_options the value for "upload_path" was empty. So I entered the following as value: "wp-content/uploads".

  • In Filezilla in wp-content, I deleted the default "uploads"-folder and manually created it again and then by right-click on it changed the file attributes to 777 (instead of 755 which was not working for me).

8
This is definitely a permissions issue. Are you using shared hosting, vps etc. Also see this link codex.wordpress.org/Changing_File_PermissionsThe Humble Rat
@TheHumbleRat Thank you very much. I am new to wordpress. What exactly do you mean by shared hosting and vps? So you mean it is a server problem? Should I contact my domain provider?MaxNagler
If your website is on-line, you must be using a host ie, host gator etc. So the issue is something to do with the hosting environment, ie on the server. Whether this be permissions etc. So this is not to do with the domain provider, but the website host, unless they are the same company. When you selected your host, you would have also chosen a package.Normally they offer three packages, shared hosting, a vps (Virtual Private Server), or a dedicated server. What I need to know is if you have SSH access to the server.The Humble Rat
Upload dir set to 777 is not a good ideadstonek

8 Answers

1
votes

It is due to transfer of your website site from one server to another server of cause due to a small bug in wordpress 3.8

please follow following links:-

1) if you had change your server http://wordpress.org/support/topic/cant-add-images-to-the-media-section-error-unable-to-create-directory-uploads

2) If you had installed newly wordpress on your server https://core.trac.wordpress.org/ticket/26781

Thanks

1
votes

Very simple solution for this is

Login to your wordpress admin Go to Setting->media You will see the path in a text field with a label "Store uploads in this folder". It will be something like /var/www/vhosts/modeling.com/httpdocs/wp-content/uploads/ Just remove the slash in the front and make it like var/www/vhosts/modeling.com/httpdocs/wp-content/uploads/

Save the settings and you will be able to upload images.

0
votes

connect to you site using some ftp client such as filezilla navigate to site-folder->wp_content and right click then click file attributes or file permissions Now there is a box which accepts numeric values for permissions type 0755 and apply to all subfolders Do not enter 0777 in that box that's dangerous which will give all the permissions

Refer here for more info: http://codex.wordpress.org/Changing_File_Permissions

0
votes

I see you are doing it on wp-content directory. You need to set same permission for "uploads" directory which is within the wp-content directory. That should solve the issue.

Also check mark the option that says "Recurse in subdirectories"

0
votes

Are you using WP Smush it plugin? If yes, then try re-installing the plugin or remove it completely. It's work for me on juristpedia.ro

0
votes

None of the above solutions worked for me. The issue was resolved after having discovered that I had run out of space at my host. I deleted a bunch of files and everything returned to normal a few hours later.

0
votes

I am running Wordpress 3.8 on Windows Server 2012 and had a similar issue. In the wp_options table the "upload_path" option_value was empty. Changing to "wp-content/uploads" did not work, but setting the value to "/wp-content/uploads/" (add leading and trailing slash) did.

0
votes

It took me longer because the solution to this post is in the question. So here what worked for me copied from the Question:

In my database in wp_options the value for "upload_path" was empty. So I entered the following as value: "wp-content/uploads".

You can also edit this under Settings>Media in case it's not set to default (wp-content/uploads is default).