How do I move important Joomla files outside public_html?

Prohibiting direct web access to important Joomla files by placing them outside your public_html directory is a good practice in terms of security.

For example, if you want to move the main configuration file (configuration.php) of your Joomla outside the public_html directory, you can do that by following 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 ' );

?>

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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to test if jHackGuard is working correctly on your Joomla site?

If you want to be sure that jHackGuard is installed and working correctly on your website, you...

How to remove time stamps from Joomla SEF URLs

Due to an incorrect alias or a non-English character in your category names, Joomla may replace...

How to configure AcyMailing to comply with hostlantern e-mail terms of use?

In order to comply with the SiteGround e-mail Terms of Service you have to configure your...

Joomla caching

The caching mechanism implemented in Joomla is a way to improve the performance and loading speed...

How to extract and restore a Joomla .jpa archive or backup?

Upload your .jpa archive in public_html through your FTP client:...