Updated on Mar 13, 2019
In this tutorial, we will review the configuration file of CS-Cart and how to locate/edit it for your needs. It is a good way of performing changes on your website without accessing it's administrative area. In general, it is an advanced way of manipulating your website.
Even if you are not a developer, the configuration file of the application you use is something you need to be aware of. It holds important information about the setup of your website and it is the quickest way of making changes, without accessing the administrative panel. In CS-Cart, there are two configuration files and we will review the one that holds the information for your database and domain.
To locate the configuration file of your CS-Cart website, you need to access the ROOT directory of your installation. If you are accessing your website using the primary domain of your account, this indicates that the CS-Cart installation is in the public_html/ directory of your account. However, this may differ if your website is set in a subfolder, or on a subdomain.
There are two ways of accessing files on the server - using an FTP client, following our FTP tutorial, or directly through your cPanel account → File Manager, following our cPanel tutorial.
Once you locate your CS-Cart installation, you need to review for a file called config.local.php as it holds the details that we need to review. The database details of your website are hold in the following section:
/* * Database connection options */ $config['db_host'] = 'localhost' $config['db_name'] = 'cscart_cscart' $config['db_user'] = 'cscart_cscart' $config['db_password'] = '[email protected]%h4tjnaz' $config['database_backend'] = 'mysqli' // Database tables prefix $config['table_prefix'] = 'cscart_'
The information about the domain used on your website is hold in the following section:
// Host and directory where software is installed on no-secure server $config['http_host'] = 'cscart.fcomet.com' $config['http_path'] = '' // Host and directory where software is installed on secure server $config['https_host'] = 'cscart.fcomet.com' $config['https_path'] = ''
This is the quickest way of editing this information, if you are generating/restoring a backup of your website, or you are simply changing it's location. Still, be careful when making changes on your CS-Cart configuration file, as it may result in it's complete inaccessibility.