Upload error on wordpress

October 14, 2014 2.6k views

I have kindly been helped by a good friend who has put my website on here and its fantastic however i get this error - “CAMERA.png” has failed to upload due to an error
The uploaded file could not be moved to wp-content/uploads/2014/10.

How do i resolve this issue thanks

1 comment
  • This error is generally caused by write permissions on the uploads/ directory.

    The uploads/ directory should be set to at least chmod 0755 to enable directory creation by WordPress when uploading files through the media library uploader.

3 Answers

Hi there and where do i change this please as I have changed lots of permissions and it still is not uploading

  • Are you logged in as the root user via SSH?

    Also, you should check to see if you have directories for "uploads/2014/10". Sometimes simply adding the month directory (in this case, '10') solves the immediate problem of being able to upload files.

  • Hi there - my friend moved everything over for me and everything was so fast but I am personally unsure how to change it as I am new to Digital Ocean - I just want to be able to upload images to my wordpress site as i did on my old hosting

    Sorry to not be very technical here

  • I've tried both 777 and 755 for my uploads (2014/10 too) directory and i still have the same error as OP. Done it both in filezilla (root via ssh) and on console. Still nothing helped

you might want to check if the wordpress directory is owned by www-data or if your current user is a sudoer.

I ran into a similar problem after following the initial Ubuntu 14.04 server setup, install lamp on Ubuntu 14.04, install WordPress on Ubuntu 14.04, and Configure Secure Updates and Installations in WordPress on Ubuntu tutorials.

Got it working using - sudo chown -R www-data:www-data /var/www/html/wp-content/uploads

Have another answer? Share your knowledge.