This WordPress problem is quite common when switching hosts so I figured it would be helpful to show you how I fixed and diagnosed my WordPress image upload issue within a few steps. After transferring my WordPress website, Plain Dumb, from an old cPanel host to my Rackspace cloud site account I received the dreaded image upload error:
has failed to upload due to an error Unable to create directory uploads/2012/11. Is its parent directory writable by the server?
I first thought it was one of these two problems but later found out it was something entirely different:
- improper permissions
- owner permission issues
Do your upload folders have proper file permissions?
First I made sure the uploads folders were set to 755. I verified they were and the uploads still didn’t work. Just for curiosity I set them to 777, which you shouldn’t do, but I just wanted to see if it would work. It didn’t. I changed them back to 755 and moved on to the next step.
Is the owner of your folders and files set to your previous web hosts user and group?
The next logical step was to check owner / group settings, which I verified was set to my hosting accounts proper owner and group. Since this was fine, I Googled around a little more and finally found a solution.
Did you check your media upload settings in WordPress?
Go to settings > media to find your media settings. Where it says store uploads in this folder, make sure the path is correct or delete it entirely. I noticed mine was set to the old host path! After I removed it completely I could upload images again!
One Response to “WordPress Image Upload Error After Host Transfer Solution {Unable to create directory uploads}”
BDI Media
Nice post here and have moved a few wordpress sites over. Will keep these details in my favourites for when I have to transfer the next one!!
Good reading