How to move the configuration.php file outside of Joomla root dir

30 12 2008

This is a safety tip to make it a little more difficult for anyone with development knowledge to mess around with your Joomla site. The idea is to move the configuration.php file to a place different from its normal location and to rename it so it is harder to find.

To move the configuration.php file and rename it do the following:

1. Move configuration.php to a safe directory outside of public_html and rename it whatever you want. I will use the name joomla.conf in this example.
2. Create a new configuration.php file containing only the following code:

[sourcecode language='php']

<?php

require( dirname(__FILE__)b.’/../joomla.conf’ );

?>

[/sourcecode]








Follow

Get every new post delivered to your Inbox.