Allow a specific PHP file to access a hardened wp-content folder
snippet in htaccess

Allow a specific PHP file to access a hardened wp-content folder

user2927

<Files *.php> 
    deny from all
</Files>
<Files "xml-sitemap-xsl.php">
    Order Allow,Deny
    Allow from all
</Files>