Difference between revisions of "Moving sensitive files outside the web root"

From Joomla! Documentation

(while under review, please see this forum topic)
(Editing and saving/applying)
Line 75: Line 75:
[http://forum.joomla.org/memberlist.php?mode=viewprofile&u=396945 jacksun]
=== Editing and saving/applying ===
=== Categories ===
<font color="#ff0000">'''Warning!!'''
Do not use the Joomla web administrator interface global configuration button to edit the global configuration.</font>
If you need to change configuration settings, do so manually by downloading the relocated joomla.conf file, making the needed edits and uploading it back.
Making edits to the global configuration in the Joomla web administration interface will overwrite the 3 line configuration.php file pointing to the real configuration file with the real configuration.php file contents upon saving or applying the edits. This will undo your efforts to move and protect the configuration.php file by placing it in a directory outside of public_html.

Revision as of 18:33, 20 October 2010

This Article Needs Your Help



while under review, please see this forum topic









3. If your Joomla site is installed in the root of the public_html directory and not in a subdirectory under public_html, then create a new configuration.php file for your joomla install in the public_html directory containing only the following code:

1) Create a directory immediately above your public web directory (which is often public_html). I'll call this directory "configuration" all lower case, quotes aren't part of the directory name.

2) Go to the root/includes/ directory in your Joomla install and open the file defines.php in your favorite editor

3) Around line 26 you will see this:


Replace it with this:




4) Repeat these exact same steps with the same file (defines.php) that is located in the root/administrator/includes/ directory. If you don't do this access to your admin area will be prevented.

5) Go to the root of your installation and rename the configuration.php file to something like somefile.html or whatever while testing the modifications.


7) Delete the old renamed configuration.php file from the root of your Joomla installation

8) Retest your website thoroughly to make sure everything works correctly.

9) Make sure you add the new directory (design2-files) with the configuration.php file in it to your backup job so it doesn't get missed.




Contributors & Editing

mandville PhilD jacksun