<IfModule mod_authz_core.c>
    <FilesMatch "\.php$">
        Require all denied
    </FilesMatch>
    <FilesMatch "upgrade.php">
        Require all granted
    </FilesMatch>
</IfModule>

<IfModule !mod_authz_core.c>
    <FilesMatch "\.php$">
        Order Deny,Allow
        Deny from all
    </FilesMatch>
    <Files "upgrade.php">
        Order Allow,Deny
        Allow from all
    </Files>
</IfModule>