How do I block direct web access to important Joomla files using .htaccess file?

Protecting the critical Joomla files from being accessed directly over the web is an essential aspect of your website’s security.

Add this code to your .htaccess file in order to protect your Joomla’s configuration.php file and your .htaccess file from direct access via web:

<FilesMatch "configuration.php">
Order allow,deny
Deny from all
</FilesMatch>
<Files .htaccess>
order allow,deny
deny from all
</Files>

You can modify the .htaccess file of your Joomla via FTP, SSH and File Manager in cPanel.

Joomla is a powerful software that is easy to work with once you have the right host to support you. Before you lose any more time with the wrong host, check out the SiteGround Joomla hosting offer.