I’m hosting a local version of my wordpress theme on Ubuntu 11.10. However, LAMP is installed in a directory that requires sudo privileges. When I try to add images or any outside content to my theme, it fails because it cannot create a folder/write to a folder.
How do I edit the permissions to allow WordPress the access it needs?
I think that setting all to 777 is not the most secure option.
Basically, my favourite is to change the wordpress to the webserver’s owner. Being:
So that the webserver is responsible for handling changes.
Also, you can change the rights to 755 for the whole /var/www branch
Finally, allow your wp-content/ folder in 775 ( so that you can edit files from the WordPress backend without having to upload files via FTP. ( Not necessarily a best practice but useful from time to time ) via
And you will have a reasonable setup with uploads, editing from backend and a minimum level of security.