Unable to create directory in wp-content/uploads in Wordpress

Aasim Hussain Khan picture Aasim Hussain Khan · May 12, 2015 · Viewed 39k times · Source

I am not able to upload any images to the Media section. I get this error message:

"Unable to create directory wp-content/uploads/2015/05. Is its parent directory writable by the server?"

I tried changing the permissions, gave full access 777 to both uploads, and wp-content directory but this didn't help.

I tried changing the owners to apache : apache for /wordpress/wp-content, but that hasn't helped either.

upload_path is set to wp-content/uploads in option-media.php. Still it is not working.

Tried defining upload path define(UPLOADS, 'wp-content/uploads');No Help.

(server: centos)

Someone, please help!!!

-Thanks in advance.

Answer

user4796874 picture user4796874 · May 15, 2015

Debian like:

chown -R www-data:www-data /var/www/{yourpath}/wp-content/uploads