Today I was working on a WordPress site and received this error when I tried to upload an image:
“Unable to create directory uploads/2013/04. Is its parent directory writable by the server?”
I immediately went to my FTP program and changed the permissions on the uploads directory to ’777′ – this didn’t fix it.
So I started googling to see if this was a known error and how it could be fixed. Other people were having the error and it was suggested that people go (in the WordPress admin panel) to Settings > Media and change the setting so that files are not stored in date based folders.
Doing this made me realise what the actual error was – I had changed hosting servers a few months previously so the file path that WordPress had stored in the database was no longer correct! I had forgottten about the change and expected WordPress to just keep working as normal.
In the ‘Store uploads in this folder’ section of the Media > Settings page I updated the setting to my new server path:
and all is well
(*Update: As of WordPress version 3.5 there is no longer a ‘Store uploads in this folder’ option in the admin panel. There is a handy plugin from ‘RVOLA’ here that should do the trick: wp-original-media-path/ and some other suggestions in the comments below)
I thought I’d make a quick post about this here on my blog just in case it’s helpful to anyone else who has this problem. Hey we all forget things from time to time!