Failing to Upload Media to Wordpress

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Failing to Upload Media to Wordpress

Postby asoola » 17. December 2015 21:24

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
asoola
 
Posts: 2
Joined: 17. December 2015 20:57
Operating System: Windows 10

Re: Failing to Upload Media to Wordpress

Postby Nobbie » 17. December 2015 21:30

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.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Failing to Upload Media to Wordpress

Postby asoola » 17. December 2015 21:40

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?
asoola
 
Posts: 2
Joined: 17. December 2015 20:57
Operating System: Windows 10

Re: Failing to Upload Media to Wordpress

Postby Nobbie » 17. December 2015 21:42

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
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 157 guests