Report this

What is the reason for this report?

WordPress Permissions

Posted on April 9, 2013

This is my first time running my own server, and the guides on DO have been fantastic so far. I’m running Ubuntu 12 + LAMP, a pretty basic set up.

I set up WordPress by creating the MySQL databases, and then uploading the WP files to the directory. I didn’t do anything else.

The only issue I keep running into is permissions when setting up WordPress. For example, WP Super Cache needs to write your wp-config and files in wp-content. I know setting permissions to 777 is not very secure, so is there a better way to handle permissions to allow WordPress to write and edit what it needs to without exposing my server to the world?

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Looks like I made a big mistake - running that command in my root directory rather than the site directory. Time to start over =\

You can check what user your Apache is running as and reown those directories to the same user as Apache, then it will have write permissions but will be slightly more secure than 777. <br>

Ah, I did see that command in the guide to install Wordpress. I just ran the command: <br> <br>sudo chown www-data:www-data * -R <br> <br>and I seem to have lost all access to everything. I can’t connect to any sites or databases on my server. Did I do something wrong here?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.