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.
I was looking for a MAC/ OSX solution and found this related question but it didn't help. The following works for me: 1- Right-click on
wp-content
and go to Get Info and change permissions as follow:After click on the setting gear icon and Apply to enclosed items....
Change permissions on the /wp-content directory to 0775 and try it again.
If it fails, change the permissions to 0777 and try again.
Once it is successful, be sure to return the permissions on /wp-content to whatever they were when you started.
You may also want to put the permissions back on any other files you changed while attempting to resolve the issue.
More options you can find here: https://www.tipsandtricks-hq.com/how-to-fix-the-unable-to-create-directory-error-in-wordpress-5264
Reggards
I was having a similar problem after migrating from a development site to a production site. It turned out that the message is deceptive. Check Settings, Media. Verify the directory for media is accurate for the current site. If the site was migrated, the directory listed still be from the old site and may need to be updated.
If this error is showed after migrating wordpress to new server check upload path in: settings->media->Store uploads in this folder
default value is wp-content/uploads.
Probably you have old path.
I tried all the solutions from How to Fix the Unable to create directory Error in WordPress in my Centos7. But it won't work.
Then I found some useful message in /var/log/audit/audit.log
Check the file infomation :
ls -Z /data/web/wordpress
Found that SELinux prevented Httpd to access the files. So you can disable the SELinux, or modify the file context: chcon -R --type=httpd_sys_rw_content_t /data/web/wordpress . And it works.
Debian like: