Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Kevin Murphy24,380 Points
.htaccess file - Wordpress -- What is this file and it's role specifically?
Had a friend with an .htaccess permissions issue today. Reminded me that I have been curious what this file does and why sometimes the permissions need to be altered etc. Haven't found a concise explanation, I've even read that in some cases use of the file is optional?
Any experienced WP developers out there that could clarify this? Perhaps a practical example of its role? Greatly appreciated.
Fundamentally, .htaccess is an Apache web server configuration file. It's commonly used to override other configuration settings, especially at the directory level--customizing error pages, access control (to directories, for example), and more.
With WordPress, the primary use of .htaccess is security (access control).
Here's a great, comprehensive resource:
Here's what the WordPress Codex says about it:
Here's the Apache page about it:
And this discusses WP and .htaccess together, in the context of security:
Oh, and in case you were interested: it stands for "hypertext access".