On one fateful occasion when I had problem uploading images from the admin dashboard, I wrote a post with the similar title The Uploaded File Could Not Be Moved To [Unsolved] and little did I know that it has become one of the most popular post with the second highest organic traffic based on my last statistics from Google.
I conclude that there are a lot of people out there who are still having similar problem even with the latest WP 2.5.1. It’s just a puzzle why this image uploading error hasn’t been fixed till now. The fact of the matter is that the solution differs from one person to another which means what works for me may not be the solution for others.
So in the spirit of sharing and learning, I’ll highlight some of the possible solutions for the benefits of those who are still struggling to find the fix. I know it’s that much of frustration to be in that kind of situation.
Possible Solutions to Image Upload Error
The following solutions are those that may have worked for some but didn’t quiet fix it for me. Here’s how I fixed the upload issue.
1. Changing file permission
I suppose the very first thing you need to check is whether the correct file permission for /wp-content/uploads/ has been set 777. If you aren’t sure, here’s how to set file permission.
2. Setting the default folder
Go to Settings > Miscellaneous and check that the default folder for uploading is set to /wp-content/uploads/. There are times when the folder is not properly defined.
3. Re-writing .htaccess
Emma from UOTW has shared with us the solution by re-writing your .htaccess to include an additional set of code.
SecFilterEngine Off
SecFilterScanPOST Off
It is understood that some plugins may modify your .htaccess and changes can be lost during installation.
4. Re-create /wp-content/uploads/
The other option would be to first delete the folder /uploads/ from /wp-content/ directory and re-create it again and then set its the permission to 777. You’ll surprised that this method seems to work for some people.
5. Enable safe_mode_gid=Off in php.ini
If all the above solutions doesn’t work for you, Sébastien Wains has a fix by editing the value “safe_mode” to off in /etc/php.ini but if you aren’t not familiar with safe mode, you may not like this idea. In what I have learned, in most cases, your host may not allow you to disable the safe mode for some security reasons.
If everything else fails…
If everything else fails, it’s best to contact your host provider and hope that they even care anything about it which, speaking from my personal experience, they usually couldn’t careless, simply because they are too clueless about it.
As I’ve said earlier, the reason I’m writing this post is to share with my readers out of goodwill some of the possible solutions to image upload problem. Therefore if you have another solution that might work, please do tell us how you fix it and what work for you.
That being said, please correct me if I’m wrong with any of the above solutions. I’m willing to update it for the benefit of others.
Update:
Here’s yet another solutions that may work in your favor;
1. Update Flash to new version on the computer used to upload photos, WP uses it.
2. If any plugin(s) won’t work with /wp-content/ or /wp-content/uploads/ chmod 777, as some of them won’t, then sub directories’ folders /wp-content/uploads/2008/07/ for storing uploads etc. can be created and uploaded manually.
Thanks to one of our friends, Rado from Pizza Oven.
More update:
It seems like the image upload problem has been addressed with the recent release WP 2.6. Please let us know if problem still persists.
Have yours been updated with the latest WP 2.6?
Related posts
- The Uploaded File Could Not Be Moved To [Unsolved] Just when I thought I had it, my WordPress just failed me right at my face. The thing was this....
- How To Change File Permission – CHMOD There are times when, depending on the specific thing you are doing,orfor instance, you need to change the file permission...
- Image Upload Problem – Fixed Sometimes the best solution to a complex problem is simply simple. A while ago I wrote a postout of sheer...
- Hosted.org – Easy, Practical & Free File Uploading This is a sponsored review of Hosted.org that is based fully on my own opinion and is not biased in...
- Do-It-Yourself WordPress Installation Installing WordPress on your web server shouldn’t be too much of a task. It is relatively easy to perform even...
{ 1 trackback }
{ 31 comments… read them below or add one }
Thanks for the link love, Yan :)
EmmaB’s last blog post..Need Contest Sponsors
@Emma: Just my way of returning you the link credit, gal. I promised you a while ago, didn’t I?
To add two more to this list of fixes:
1. Update Flash to new version on the computer used to upload photos, WP uses it.
2. If any plugin(s) won’t work with /wp-content/ or /wp-content/uploads/ chmod 777, as some of them won’t, then sub directories’ folders /wp-content/uploads/2008/07/ for storing uploads etc. can be created and uploaded manually.
With all these changes, have you noticed that e.g. uploaded images having permission 666 instead of 644 ?
Hi Yan -
Your Article is spot on and well researched – you are in danger of breaching your terms of intent :-). Your blog is for beginners, but this article is useful to much more knowledgeable readers?
Rhys’s last blog post..Now You Can Have a Top Money Making Blog
@Rado: Thanks for the input and I’ll update the article in a while. With regard to your question, I’m not too sure about it as my method of fixing the problem was different from the one you suggest. Were you having similar problem too?
@Rhys: I’m aware of it and in fact, most beginners are the ones having harder time trying to solve the problem whereas the pros are finding it easy to fix it. I was at a loss for a couple of days before I could upload any file, albeit without the flash uploader.
But everything is working perfectly fine now since the day I switched my host. Hopefully…
I use image uploader for every post I make, a picture says 1000 words. A month ago what i dealt with uploads in WP 2.5.1 was that after crunching (resizing) for instance an image the new flash uploader simply stopped. I did resolved it using the same ways you described plus the two I posted as additions. BUT in upcoming new WP version 2.6 this will be fixed, plus a new option probably will be added to swap between flash or non flash uploader. This will be great for those whose hosting server is restricted as per security defaults. In the mean time I create the folders rather manually (without having the directory chmod to 777) to keep all my files in the folders normal chmod 644. In 2.6 we will be able to move uploads’ folders to a remote directory, outside of wp-content folder which will be practical in few ways.
@Rado: I’m too about to upgrade to WP 2.6 and it’s good to hear that the issue has been fixed.
I agree that with the option to choose between flash and non-flash will help address the common image upload problem. Thanks for your input.
I ran into similar problems when I first installed Wordpress. I simply created another uploads folder which I upload to via FTP. I keep all my images in there, I don’t mind not having access through dashboard. I have noticed that certain things will just break on WordPress. Probably due to playing with plugins, but I’ve had my issues; the seemingly unrelated ones are the most baffling.
I faced quite a few problems with file permissions for some time. But i googled and found out things by trial and error. It sure is fun!:)
Anyway, i have a doubt. I have set up my blog http://thevoiceswith.in in wordpress and the comment section doesn’t seem to work. The window shows an error message that says “page has been moved or doesn’t exist”. What do i do about this?Please help!
@Ranjani – I guess you must have deleted one of the php function within the comment.php and since I couldn’t access it I have no clue what’s the issue.
Anyway, I can see that you have done a major tweak to the design hence asking to reinstall the theme wouldn’t be a fair option.
So is it possible that you cross check your existing comment.php with the original line by line and see what’s missing from there?
Hope it does help. Let me know if you need anything else…
Yan
Thank you very much for the great information
your article really helping me..im having this prob too,then i googled the prob and just find your solution..if u dont mind i want to put yours inside my blog post,later on i’ll make a post bout this prob,sorry for my bad english,:P
payeh´s lastest post..The Payeh Dot Com Evo 2 released!!
No problem, bro. Go ahead..shout it loud. By the way, don’t forget to subscribe to this blog for more blogging tips.
Yan
believe it or not, the answer was staring me right in the face, but it was so simple, i didn’t realize it.
- I ran out of disk space on the server. I had set aside 50 meg for my blog and I checked and I had used all of it. I simply increase it and voila.
patrick´s lastest post..Obama assures the GOP to look into the new stimulus package
Hi there,
The above solutions are feasible in Linux server but what abt windows? I am trying to import my wp of local WAMP server but it gives me this error. If I try to upload some media file, I still get the same error.
I was getting unable to create directory error before creating the uploads/2009/03 folders manually.
Is there any quick tip to solve this?
yatrik
Hi Yatrik
Honestly I’m not familiar with windows server so I’m afraid I’m not the best person to seek for solution. My apology!
Yan
I finally got the error messages fixed.. however, it appears to upload my image, but I get the big red X.
When I check in the cpanel file, there are no images there… hence the red X.
How do I fix this????
I wish I could help you but I’ve never encountered upload issue of this kind. Again my apology.
The problem still repeats with WP 2.6. None of the method worked for me. What I did was login to FTP, right click on wp-content/uploads folder, and set permission to write for all users. That seems to work. I dont know how safe it is now as I enabled write access for all users. Can someone upload anything on that folder?
hi, thanks for detiled article. I have same problem and try all ways to fix it, except that ones : 3. Re-writing .htaccess and 5. Enable safe_mode_gid=Off in php.ini. It seems I dont have access to that settings. If somebody hav idea how to fix it? Possible I’ll send ticket to host support :(
Paulo | CmsBay´s lastest post..Twiitter is going to monetize trough the game
what worked for me was, re-creating uploads folder with chmod777 on my ftp server and the clicked and dragged it over to my my www folder on my VPS merged them together all good! thanks i couldn’t have done it with out you
doing chmod777 is a fundamental and elementary newbie mistake. Following this solution exposes your domain to hackers.
That said I personally have not yet found a solution. I have two WP domains hosted by separate service providers. On Domain A I have no problem on Domain B I cannot get it to work. Solution: ???
Thanks for the tips! I have encountered this problem with my wordpress. I followed your instructions. Done! It works! Thanks Again!
Games Cradle Online´s lastest post..Free Download and Play Samurai Showdown V Special Video Game
I had this problem even though all my folders were properly owned and had the correct permissions. Then I Disabled Open BaseDir restrictions in php and everything started working fine.
I was able to adjust this option using my DirectAdmin control panel options, but it can also be done manually though ssh editing the php.ini file.
Something is still not working for me. I checked folder permissions, checked the .htaccess file. I am not going to redo my uploads folder because it has a lot of images. What is wierd is that the Plugin install is giving me this error but the upload of images is not giving me this error.
I had to upload the plugin files manually and do an old fashion install (unzip, upload into folder, activate from admin panel).
Thanks a lot for this post! It solved the problem just fine. The rights were set to 775 while it should have been 777.
Great great post!! I did everything but alas no avail! :( I first thought it was a disk space issue so I bought a hostmonster package and now NONE of my previous images are showing up! I’m so frustrated and confused that I think I’ll just shut down the site since no-one can help me or wants to. But thanks for this great post :)
Be every careful with the setting of 777 as it can solve my problem, but it will cause some security problem whereby people can hack in and modify the picture to some other picture to jeopardise your blog.
At the moment, I’m looking for solution which does not compromise the security of the uploads folder
Hello;
I had the same problem within Wordpress 2.8.6:
“The uploaded file could not be moved to… ” while uploading a plugin in zip format.
CHMOD 777 did not solve the problem, neither the recreation of upload folders. The error message did not give any clue why it failed!
But the cause was the fact that the file was 3Mb, and the PHP.INI upload limit was 2Mb, I changed it to 4Mb and it worked with no problem!
upload_max_filesize = 4M
Try to upload a small file and if that works, it is not a permission problem.
Maybe this helps for somebody.
THank you very much. I was about to go crazy trying to fix this. It was the permissions for the file that was incorrect. THANKS
Hey man,
Thank you very much for your help… It worked for me. I was notching my hairs from few days….
Thanks