Page 1 of 1

Failing to Upload Media to Wordpress

PostPosted: 17. December 2015 21:24
by asoola
I am using XAMPP 5.6.15, Windows 10.

I am running wordpress 4.4 on localhost. I am trying to upload media and getting the following error:

“instagreen.png” has failed to upload. Unable to create directory D:/ProgramFiles/xampp/htdocs/wp-content/uploads/2015/12. Is its parent directory writable by the server?

I don't think its a file permission error. I ran chmod 777 on the directory recursively (I know this is a bad idea, but I had to double check whether permissions were really a problem).
Here are my file permissions:
drwxrwxrwx+ 1 Aseel None 0 Dec 17 13:44 wp-content
In fact, I changed the permissions for the entire ProgramFiles directory (bad idea again, I know).

I cannot seem to fix this problem. Any idea?

Asool

Re: Failing to Upload Media to Wordpress

PostPosted: 17. December 2015 21:30
by Nobbie
asoola wrote:I don't think its a file permission error. I ran chmod 777 on the directory recursively (I know this is a bad idea, but I had to double check whether permissions were really a problem).


"chmod 777" is unknown to Windows, it is working on Linux only.

I dont know which software you used for "chmod", but it is only a simulation or emulation. The WIndows Rights System differs extremely to the Linux Rights System. As far as i see, you installed Xampp into the Program Folder, what is NOT recommended.

Re: Failing to Upload Media to Wordpress

PostPosted: 17. December 2015 21:40
by asoola
I used Cygwin.

Fortunately, I found the issue.

I had to go to phpmyadmin, and go to the wp_options table, and change the upload path to "wp-content/uploads" as opposed to "D:/ProgramFiles/xampp/htdocs/wp-content/uploads/"

Whats wrong with installing it in the Program Folder?

Re: Failing to Upload Media to Wordpress

PostPosted: 17. December 2015 21:42
by Nobbie
asoola wrote:Whats wrong with installing it in the Program Folder?


It is not recommended as it can collide with WIndows UAC. The Default Recommendation is c:/xampp