Академический Документы
Профессиональный Документы
Культура Документы
Canadian Web
Hosting
Mini Plan
For Joomla 3.x the process is the same as for Joomla 2.5 except that DS is replaced by actual directory
Starter Plan
separator.
Business Plan
define( 'JPATH_CONFIGURATION', JPATH_ROOT.DS.'..'.DS.'sitename' );
becomes
define( 'JPATH_CONFIGURATION', JPATH_ROOT.'/../sitename' );
Hosting Features
CPanel Included
Free SSL Question: How can I protect my Joomla 3.x configuration.php file from possibly being viewed due to
Softaculous server misconfiguration?
Website Builders Answer: Move it to the |Home directory (above public_html directory) which can only be accessed via FTP
Joomla Hosting or CPanel File Manager.
Wordpress Hosting Pros: configuration.php will be better protected and your site will be more secure.
Cons: No longer possible to edit configuration.php via Global Configuration in Joomla Administrator. The
file must be manually edited.
Search ...
Step 1: Move configuration.php from the public_html directory (folder) to the Home directory above using
FTP or CPanel File Manager.
Tip: If you have more than one Joomla site involved make a folder for the file to keep it separate otherwise
it could be overwritten. eg:(/home/cpanelusername/sitename/configuration.php)
Step 2: Edit the files that contain the path to configuration.php.
[joomla root]/includes/defines.php
[joomla root]/administrator/includes/defines.php
This is the constant to modify
define( 'JPATH_CONFIGURATION', JPATH_ROOT );
For example if Joomla is installed in the public_html folder (web root) then to move the file up one level into
the Home directory and into a folder named "sitename" the constant will look like this:
define( 'JPATH_CONFIGURATION', JPATH_ROOT.'/../sitename' );
Mobile Version
https://www.newmediacanada.com/joomla-tutorials/396-joomla-3-security-move-configuration-php-above-public-html 1/2
9/27/2019 Joomla 3 Security: Move configuration.php above public_html
https://www.newmediacanada.com/joomla-tutorials/396-joomla-3-security-move-configuration-php-above-public-html 2/2