If you get this error when you try to upload an image to your WordPress blog, there are two things you can do:
- Go to Settings > Miscellaneous in your Wordpress admin area and make sure that ‘Store uploads in this folder’ is set to the default:
wp-content/uploads(notice there is no ‘/’ before wp-content/uploads). Try to upload again and see if it works. - If that didn’t work, open up a terminal and navigate to the wp-content directory. If wp-content does not contain sub-directory called ‘uploads’, create one and then change its permissions to wide open (
sudo chmod 777 uploads/). Try to upload the image again. If this works, navigate to thewp-content/uploads/directory and check the owner of the image you just uploaded (ls -l). It will probably be something weird you’ve never seen before (mine was ‘www-data’). Navigate up a directory and change the owner of theuploadsfolder to the one WordPress want to use:sudo chown www-data:www:data. Then revert the permissions back to something a little safer:sudo chmod 755 uploads/and you’re done.