| 7 | 7 | As for the security situation I mentioned, I was referring specifically just to restricting open_basedir to not include the directory above the web directory (which shouldn't need to be explained), and that such a restriction, in combination with the deletion of wp-config-sample.php file, would result in the PHP warning message in the log. That is all. Deleting the wp-config-sample.php file in and of itself is not necessarily a "security measure" - although deleting the file on a completed installation does reduce the unnecessary overhead from requests to this file, which subsequently loads the wp-settings.php file, which loads numerous other functions for no reason, to inevitably return a "Database Error - Error establishing a database connection" page, whereas on a completed installation the wp-config.php returns nothing (except a 200 response) if it is even publicly accessible (I personally block public access to wp-config.php using .htaccess). However, most do not take any similar steps to restrict public access to the wp-config-sample.php file if it still exists, as they assume like you did that it's a non-issue. Which isn't wrong exactly, but I believe it could definitely be improved upon, but that's for another discussion I guess. Hopefully this at least helps to explain why someone, like me, would delete the wp-config-sample.php file, and be plagued by the persistent error log messages/warnings due to bad actors trying to probe the setup-config.php file on my sites with the current file check order used. |