WordPress error: The uploaded file could not be moved to
Error message came up when my friend upload a photo :
The uploaded file could not be moved to xxxxxxx
Yes, it seem he change to new host and since wordpress automatically save old location to database the error show up.
Solution
Open Admin Page -> Settings -> miscellaneous
Make sure value of Store uploads in this folder set to wp-content/uploads
Click Save Changes and try upload photo again.
Everything should be OK now
Related Reading:
Using DrupalWith the recipes in this book, you can take full advantage of the vast collection of community-contributed modules that make the Drupal web framewo... Read More >
Drupal For DummiesLearn to set up, manage, and administer a Drupal Web site
Drupal offers unparalleled flexibility for content-managed Web sites, but most ... Read More >
Pro Drupal Development, Second EditionWidely praised for its in–depth coverage of Drupal internals, bestselling Pro Drupal Development has been completely updated for Drupal 6 in thi... Read More >
Front End Drupal: Designing, Theming, Scripting“For Drupal to succeed, we need books like this.”
–Dries Buytaert, Drupal founder and project... Read More >
Cracking Drupal: A Drop in the BucketThe first book to reveal the vulnerabilities and security issues that exist in the sites that have been built with Drupal?and how to prevent them from... Read More >
Search Terms :
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.


This is the basic solution but after the change of directory most frequently the upload still fails until you change the permissions for the directory to 777 (open to anyone to write to the directory). This is a security weakness and should be avoided. I can’t find any information that suggests a more secure alternative. I think this is a issue WordPress should address to avoid the security risk.
I’d just like to add that with my server WordPress kept creating the upload directory if it was not present. I would set permissions to 777 and no go, errors as above.
No errors showed up in the server logs.
owner and group of the WP-created uploads folder was apache, but all other folders and directories had a different owner and group. So I used my server control panel to create the uploads directory, then set permissions once again, and this time it worked.
My ftp software (“Transmit”) could show me the owner and group of a folder but not change it. I succeeded when I deleted the one WP created and made a new empty upload folder in it’s place, then set permissions on it to 777.
I hope that helps anyone who is getting the same thing
Oh and I did do the solution as shown in the article first, so I expect that is a required step as well as the additional steps I took.