Which basically means, by default wordpress doesn’t store sensetive files outside of the web root. Instead, it stores everything at public accessible directory but restrict access to sensetive – core files via htaccess
, Kindly confirm if, this is the default practices? *So that i can confirm if this is how wordpress ecosystem works or it is due to my origin host environment.
My current setup works as such, but somehow i am looking into strengthening the directory aspect which consists of accessibility, permissions and also reachability. As accessibility and permissions are restricted as per how it should, here it comes the reachability [As quiestioned] aspect:
I was looking at the default practice which restricts via htaccess
and i found there is a risk of relying on htaccess
solely as in any event [rare occurrence] if the htaccess
gets overwritten or corrupted, it might impose a risk or a damage. Therefore, instead of relying on the htaccess
solely, i thought of conducting any each out of both below:
Option 1 : Isolation of Sensetive Files and Folders – moving out sensetive and core files and folders from the Public Accessible Directory.
Option 2 : Default with Double Layer – Maintain Existing Restriction Ruleset in htaccess
+ Block access to those sensetive paths in the first line of defense WAF Infrastructure. In any event of anything goes wrong with the htaccess
it would still not be accessible publicly due to there is already a blockage [403] before the request can even reach the origin [Nature of First Line Defense].
Well, i am not an expert here but trying to improve the security posture specifically for this directory aspect as i could see a loophole [I Guess?] as described above.
Opinions and Suggestions are Welcomed and Highly Appreciated.