For some reason when I try to upload an image to my blog I get an error message saying that WP can’t create a folder under the relevant directory (wp-content/uploads/2010/09) and it’s asking if the folder above it has write permissions.
The parent folder indeed has write permissions. I tried creating the folder manually and it still shows the same error message.
Leave a Reply
You must be logged in to post a comment.
@Lea,
This error happens when PHP (WordPress) can’t write to the file. This is caused by not having write permissions or the username or group that PHP (WordPress) is running under doesn’t have permission to write to the file.
755 permissions will allow WordPress write permissions when PHP is running as the username under most shared host plans.
Some FTP programs will allow you to change the user and group assigned to the folders. You can also make this change using Cpanel’s file manager.
The folders should have the same username as your Cpanel account.
Some server environments require you to use 777 permissions for PHP to have write access. This is not secure in a shared hosting environment. You can change your permissions to 777 temporarily to see if that allows you to upload photos but MAKE SURE YOU CHANGE THEM BACK TO 755 WHEN YOUR DONE.
Your hosting provider should also be able to provide help in this situation.
This seems to be a common problem. I’ve dealt with it a while ago too. In my case, all of the proper directories had 777 permissions. Here is my solution, along with a bunch of others that I’ve tried:
These tips come from a thread from WordPress support for WP 2.5 (you can refer to the link for more info on any of these items):
This fixed it for me: I was logged into WordPress using the user name I created when installing instead of my original cpanel user name that had proper permissions on my account. I fixed the issue by creating a new WordPress admin user using the same username and password as my cpanel user. Logged out and back in as that user and problem solved.
Try to add permission to the parent folder which is the “uploads” directory.
Try uploading the images using FTP software and see if it gives same error.
Also check if there is any plugin auto-creating a thumbnail of the image uploaded in some other directory
Also try changing the default file upload location in case this error insists on showing up
Hope any of this helps (:
One thing that occurred to me – WP will tell you that it can nto copy file to
/wp-content/upload
even when all permissions are right…. ifin
php.ini
is too small (say 2M and you try to upload 3.5MB file)!Hope that helps all thsoe who have right permissions but still can not upload!