I've read articles about protecting wp-config.php using .htaccess as well as setting the correct file permissions but I want it all in one place. What should my .htaccess file look like and what folders is it safe to have 777 vs 755 permissions?

link|improve this question

feedback

3 Answers

up vote 6 down vote accepted

Hardening WordPress on the WordPress Codex is a very good article on how to secure your WordPress blog, which goes into quite some detail on file permissions, as well as some other methods of securing WP.

link|improve this answer
feedback

Generally, it's never a good idea to have 777 set on anything. Read the links Thomas provided for more detail, but as a general rule 755 for folders and 644 for files is a good practice.

link|improve this answer
I thought if you wanted to use auto updating you needed to set some things to 777. And for sure you have to set the wp-content/uploads folder to 777. – tooshel Aug 12 '10 at 20:52
1  
You don't need 777 for the wp-content/uploads folder. I have set it to 755. jamespaulp.us/wp-content/uploads/2010/08/uploadperm.png – James Aug 14 '10 at 18:28
feedback

http://httpd.apache.org/docs/2.2/howto/htaccess.html

I am not an expert on this, but I hear that there is no need for .htaccess if you are using newer versions of Apache (IIS had this feature for quite some time.) You can disable directory browsing in your Apache config. It is the Indexes option in the Options directive of the Directory directive.

http://httpd.apache.org/docs/2.2/mod/core.html#options

I don't know if 777 is required by any. 755 is probably safe for content folders.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.