Question

WordPress Permissions

  • Posted on April 9, 2013
  • msomersAsked by msomers

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!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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?

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>