I have set up a wordpress website on amazon ec2 using ubuntu 1.04 LTS by following this tutorial end to end except that i used amazon RDS(thier cloud database service) instead of sql.Although i dont think using RDS instad of mysql could have caused the problem. But I do think you ll need to check this tutorial out before you can answer the question.

The wordpress installation works file but when i try to install a new theme or new plugin from the admin panel i get the following error

Unable to create directory wp-content/uploads. Is its parent directory writable by the server?

i even created the uploads driectory manually from terminal and then got the follwing error

The uploaded file could not be moved to /home/ubuntu/www/wp-content/uploads.

i was pretty sure it had something to do with the file and folder permissions ao i used the following commands

find /home/YOUR_USER_NAME/www/html/ -type d -exec chmod 755 {} \;
find /home/YOUR_USER_NAME/www/html/ -type f -exec chmod 644 {} \;

to set every folder to permision to 755 and file to 644 respectively but still no help i have trying to fix this for more than 2 days now without a solution. Please help! P.S.> i have wordpress3.5 , ubuntu server 12.04


What user is Apache/PHP running as? by default it would be www-data if the files/folders are not owned by this user then the webserver is unable to write changes to them. You would either need to change the owner of the files or chmod 777 /home/ubuntu/www/wp-content/uploads so that the Apache user can write in that folder.

  • i have two questions 1)how can i find out what user Apache/PHP is running as ?? 2)isnt putting uploads folder to 777 a security threat?? – Danny Dec 21 '12 at 13:12
  • Solved : i found out one small correction ... instead of changing ownership only uploads folder change the owership of the directly in which wordpress files reside to www-data (or whatever user apache/php runs on) (for more info check below links chrisabernethy.com/why-wordpress-asks-connection-info stackoverflow.com/questions/2509334/… – Danny Dec 21 '12 at 13:45

ssh in and navigate to the wp-content folder and type in these 2 lines:

sudo chown -R www-data uploads/
sudo chmod -R 755 uploads/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.