• For instance, during installation configuration?
    Or, if I select a Permalinks option other than Default or Custom?

    Most of what I read here, and in WP4Dummies, says one has to create a .htaccess file if it doesn’t exist on webserver. Yet I noticed in the Codex this line:

    If your installation of WordPress does not generate a .htaccess file

Viewing 5 replies - 1 through 5 (of 5 total)
  • As I said in another thread about a week ago or so, “A htaccess file is an Apache config file that sets/changes the server’s config settings for the directory it resides in. When you opt to select “pretty permalinks” in WordPress, assuming the server has mod_rewrite enabled, (an Apache module that rewrites permalinks on the fly) WP will use the htaccess file in conjunction with mod_rewrite to create the permalinks. If the file does not exist, WordPress will create it.”

    Thread Starter esatyrical

    (@esatyrical)

    Thanks so much for that confirmation, LenK. Especially the last sentence! It was proving hard to find those actual words here or elsewhere.

    It should be made clear, however, that WordPress will only create the .htaccess file if the directory that houses WordPress is writable.

    Having your entire directory writable isn’t the best idea. It’s easier to just upload a blank file called .htaccess, and make just it writable.

    Thread Starter esatyrical

    (@esatyrical)

    Really?
    The default permissions set by the 1-step install of WP on my host are 755 for the Includes/Admin/Content folders, and 644 for the remaining files, including the .htaccess which was created by WP.

    Yesterday, for another domain, I did create the blank file and uploaded, and acquainted myself with file permissions, which led to this question:
    https://www.ads-software.com/support/topic/170634?replies=3

    Puzzled now – that occasion of WP creating the file, if I haven’t ever changed any permissions on that domain, then as a 644 permission, the permalinks rules wouldn’t have been written (since that requires chmod 666), but the file was still created?

    mikejandreau, to invoke your advice, using FileZilla I’d have to change the (docs) directory permission to 644, or something more secure? Would that get in the way of any day-to-day use of WP?

    Once you’ve updated the permalinks change the file to something secure such as 644. General rule of thumb: Folders > 755 Files > 644

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Does WP ever create its own htaccess file?’ is closed to new replies.