How do I move important Joomla! 3.x files outside public_html?
Prohibiting direct web access to important Joomla! 3.x files by placing them outside your public_html directory is a good practice in terms of security.
For example, to move the main configuration file (configuration.php) of your Joomla! 3.x outside the public_html directory, follow these instructions:
- Move the configuration.php file to a safe directory outside of public_html and rename it however you want. For the purpose of this article, we have chosen to name the file joomconf.original.php
- Create a new configuration.php file in your public_html directory containing only the following code:
<?php
require( dirname( __FILE__ ) . ‘/../joomconf.original.php ‘ );
?>