• Resolved Mort

    (@rugbert)


    Add option for custom .htaccess file location for customized WordPress setups.

    Many companies and people set up their WordPress install similar to https://github.com/markjaquith/WordPress-Skeleton

    This allows using moving the wp-content folder and using Github and Composer to automatically deploy and update WordPress.

    However, this setup requires that WordPress is installed in a directory underneath the served root (the index.php and wp-config.php files are modified to point to that directory) and thus Wordfence security writes to the wrong .htaccess file (the correct one is in the root folder along side the modified index/wp-config files).

    I’m thinking that adding a constant to the wp-config file would do:

    define(‘HTACCESS’, dirname( __FILE__ ).’/.htaccess’);

    that way, when your plugin tried to write to the htaccess file it would say:
    if( defined(‘HTACCESS)){
    #write to this location
    }else{
    #business as usual
    }

    https://wordpress.org/plugins/wordfence/

Viewing 1 replies (of 1 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Hi Kyle,

    Thanks for the report. I’ve added this to our system for the dev team to check it out (reference number FB1486). I can’t promise that every suggestion we get will make it into a release, or when that might be, but every suggestion we get is evaluated carefully and considered seriously. A member of our dev team may or may not reach out to you here to ask for more detail. Thank you for helping to make Wordfence great!

    -Matt R

Viewing 1 replies (of 1 total)

The topic ‘Wrong htaccess file is written too’ is closed to new replies.