How to edit X-Cart configuration file

Review on how to locate and edit the main configuration file of X-Cart

This tutorial will review the process of locating and editing the main configuration file of your X-Cart website. This may be required if you are creating/restoring a backup of your website, or if you are making any changes on your actual website.


In X-Cart, you have a main configuration file that contains the details of your database, the URL set on your website and more. To locate the files, you first need to access your server via FTP or using the File Manager service within your cPanel account. If your X-Cart installation is set directly on your domain, this indicates that the location of the application is the public_html/ directory of your account. However, if you are using a subdomain or a subfolder for the installation, this may be different, depending on your setup.


Once you access the X-Cart folder, you need to navigate to /etc/config.php. Open the file for editing, in order to review it's contents. The section for the database details looks like this:


; ----------------------
;  SQL Database details
; ----------------------
hostspec = "localhost"
socket = ""
port = ""
database = "xcart_xcart"
username = "xcart_xcart"
password = "p4ssw0rd"
table_prefix = "xc_"


The host details that specify the domain used for your installation will look like this:


http_host = ""
https_host = ""
web_dir = ""
domains = ""


You can review the entire file for all of the available information and options in it. Make sure that you edit it carefully as misconfiguration of the file may cause issues with your entire website.

X-Cart Hosting - free features

  • Free CS-Cart Install
  • 24/7 Expert Support
  • Free Domain for life
  • Hack-free Protection
  • Fast SSD Storage
  • Free CubeCart Transfer
  • Free CloudFlare CDN
  • Immediate Activation
View More

45 day money back
no contract