HostArmada Web Hosting Knowledge Base

Knowledge is power! Use that power and achieve total and unconditional control over the Web Hosting Services!

Configuration file locations for the most famous Open-Source applications.

Out of all the files constructing the open-source applications, the configuration file is perhaps the most crucial. It contains information the website uses to establish a database connection along with other relevant information such as folder paths to their cache, media, or system files.

In this article, we are going to explore the locations of the configuration files for the most popular open-source applications. We are going to be reviewing their whereabouts on a cPanel server and in a situation where they are the primary domain names of the account with their root directory being the public_html folder. If the application is placed within a different directory, you can locate it using our article about what is the root directory of my website. Please be sure to replace the "user" inside this path with your actual cPanel username.

WordPress

/home/user/public_html/wp-config.php

Magento 1.9

/home/user/public_html/app/etc/local.xml

Magento 2.0

/home/user/public_html/app/etc/env.php

Joomla

/home/user/public_html/configuration.php

Open-Cart 2 & Open-Cart 3

/home/user/public_html/config.php
/home/user/public_html/admin/config.php

PrestaShop 1.6

/home/user/public_html/config/settings.inc.php

PrestaShop 1.7

/home/user/public_html/app/config/parameters.php

Drupal 7 & Drupal 8

/home/user/public_html/sites/default/settings.php

CS-Cart

/home/user/public_html/config.local.php

X-Cart

/home/user/public_html/etc/config.php

Moodle

/home/user/public_html/config.php

Social Engine

/home/user/public_html/application/settings/database.php

phpFox

/home/user/public_html/PF.Base/file/settings/server.sett.php

How to find your application's configuration file if you do not know where it is

Lastly, we would like to share a neat trick you can use in order to search for configuration files, should you need to find the one for your specific application. You need to log in via SSH and navigate to the root directory of the application, using the Linux Command Line Basics. When you are inside, please run the following command:

grep 'username_' * -Ril 

As each configuration file contains the database connection information and on a cPanel server, your database has a prefix corresponding to the username. The command will generate a list of files containing that database information, thus showing you the whereabouts of your configuration file!

Was this article useful and on point?

Find out more about HostArmada entire range of optimized Web Hosting Services and take action today on improving your website Loading Speed, Security, and overall Stability!