'WordPress files permissions on Apache

What is the best approach with files permissions for WordPress site on Apache? I'd like to be able to upload plugins directly to my local server. I'm able to do that if I change ownership on my WordPress instance files to _www. On the other hand, this makes OS X asking for password each time I'm saving any of those files. I want to save them without typing password.

What can I do to satisfy both needs?



Solution 1:[1]

What I do is: make sure the user is all over wordpress files as owner ang group. The commands are:

chown user:user -R *

Then permissions are these:

sudo find . -type f -exec chmod 664 {} +

sudo find . -type d -exec chmod 775 {} +

sudo chmod 660 wp-config.php

You can also add these permissions to uploads folder:

chmod 755 -R uploads

And you should be ready to go.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arsim Ajro