1
votes

Hi anyone can help me for this issue , I have developed a site and it is hosted on my development server but now my client wants to move it to his own production server, and my client doesn't have access to his cpanel for this server. I only have the ftp access, so I have added his database in my own development server, while in development I used my amazon s3 for storing the images , when I push to production I loss the amazon plugin . I can't able to install the plugin , so I moved to upload once again to those images through WordPress, now I face this error while uploading an image : Unable to create directory wp-content/uploads/2014/07. Is its parent directory writable by the server? , and change the ftp file permission access to 755 and changed the uploads file permission to 777 , Still I am not able to upload the images, can some one help me for this issue.

1

1 Answers

3
votes

This is a problem of the Apache permissions. I had this problem and i broke my mind for many days to understand what was happening.

The correct way (USE IT):

(the solution that i used, and worked)

You need to give Rewrite permissions to the Apache.

For Ubuntu:

  • Run via ssh: chown -R www-data:www-data /var/www/the/wordpress/directory

For Centos:

  • Run via ssh: chown -R apache.apache /var/www/the/wordpress/directory

The Wrong Way (I don't recommend it, but works...)

You can change the permissions to 777 in all the paths that Wordpress need to change. wp-content/plugins recursively on folders to solve install/update problems, and wp-content/uploads recursively on folders to solve upload media problems.

Never use it because you are giving permissions to anyone change your files. A open way for the crackers that don't like you.