Although not a common problem, I have from time to time come across a WordPress error which occurs when trying to upload an image to a Blog Post. The process appears to work correctly and the upload seems to be happening, but an error occurs of the form :
“filename” has failed to upload due to an error The uploaded file could not be moved to DirectoryStructure
This problem prevents you from uploading media to you blog posts
Cause
As far as I can tell the problem has occurred after the WordPress site has been migrated to a new host – and the old upload directory location has not been correctly updated.
Solution
Fortunately the solution is pretty simple :
- From WP Administration, go to Settings > Media
- Check the “Uploading Files” section and change the “Store uploads in this folder” field to the default setting – wp-content/uploads – and “Save the Changes“
- Try another upload,
- if it still does not work, change the permissions on the uploads directory to 766 or 777