X-Cart is a commercial open source e-commerce CMS platform written in PHP used for creating online stores for businesses and sell products.

In this topic we’ll learn how to install X-Cart e-commerce platform in Debian 9, Ubuntu 16.04 or CentOS 7, in order to create a business online shopping store.


  1. LAMP stack installed in CentOS 7
  2. LAMP stack installed in Ubuntu
  3. LAMP stack installed in Debian

Step 1: Initial Configurations for X-Cart Installation

1. On the first step, install unzip utility in your system by issuing the following command.

# yum install unzip zip [On CentOS/RHEL]
# apt install zip unzip [On Debian/Ubuntu]

2. X-Cart is a web based e-commerce platform which is deployed on top of LAMP stack in Linux. In order to install X-Cart in your system, first install all required application’s PHP modules in your LAMP stack by issuing the following command.

------------------ On CentOS/RHEL ------------------ # yum install epel-release
# yum install php-mbstring php-curl php-gd php-xml
------------------ On Debian/Ubuntu ------------------
# apt install php7.0-mbstring php7.0-curl php7.0-gd php7.0-xm

3. Next, update the following PHP variables from default configuration file and setup the PHP timezone to match your system geographical location. The list of time zones provided by PHP can be found at official PHP timezones page.

Edit PHP configuration file by issuing the below commands according to your own distribution.

# vi /etc/php.ini [On CentOS/RHEL]
# nano /etc/php/7.0/apache2/php.ini [On Debian/Ubuntu]

Update the following variables in php.ini configuration file.

file_uploads = On
allow_url_fopen = On
memory_limit = 128 M
upload_max_file_size = 64M
date.timezone = Europe/Bucharest

4. Save and close PHP configuration file and restart Apache daemon to reflect changes by issuing the following command.

# systemctl restart httpd [On CentOS/RHEL]
# systemctl restart apache2 [On Debian/Ubuntu]

5. Next, log in to MariaDB/MySQL database console and create X-Cart application database with the proper credentials, by issuing the following commands.

Replace the database name, user and password with your own values.

# mysql -u root -p
MariaDB [(none)]> create database xcart;
MariaDB [(none)]> grant all privileges on xcart.* to 'xcartuser'@'localhost' identified by 'your_password';
MariaDB [(none)]> flush privileges; MariaDB [(none)]> exit

Step 2: Install X-Cart in CentOS, Debian and Ubuntu

6. To install X-Cart, first go to X-Cart download page from a Desktop machine download the latest zip package by filling the required web form from their website.

Then, copy the downloaded zip file to the server /tmp directory via scp command or sftp protocols, as illustrated in the below examples.

# scp x-cart- [email protected]_server_IP:/tmp [Using SCP]
# sftp://[email protected]_server_IP:/tmp [Using sFTP] 

7. After you’ve copied the X-Cart zip archive to server /tmp directory, go back to server terminal and extract the archive by issuing the below command.

# cd /tmp
# unzip x-cart-

8. Then, create a directory named shop in /vaw/www/html/ path and copy the content of xcart directory to web server document root path to shop directory, by issuing the following command. Also, copy the hidden file .htaccess to webroot /shop directory path.

# mkdir /vaw/www/html/shop
# cp -rf xcart/* /var/www/html/shop/
# cp xcart/.htaccess /var/www/html/shop/

9. Next, make sure all files from webroot path /shop directory are owned by Apache user. Issue ls command to list /var/www/html/shop/ directory permissions.

# chown -R apache:apache /var/www/html/shop [On CentOS/RHEL]
# chown -R www-data:www-data /var/www/html/shop [On Debian/Ubuntu]
# ls -al /var/www/html/shop

10. Next, go to your server IP address via HTTP protocol to /shop URL and hit on Click here link in order to start the installation process.

Install X-Cart Shopping Store

Install X-Cart Shopping Store

11. Next, check I accept the License Agreement and the Privacy policy and hit on Next button to accept the license and move to the next installation screen.

Accept X-Cart License Agreement

Accept X-Cart License Agreement

12. On the next screen add your email address and setup a password for admin account and hit the Next button to continue the installation process.

Create X-Cart Admin Account

Create X-Cart Admin Account

13. Next, add X-Cart MySQL database name and credentials created earlier, check Install a sample catalog and hit on Next button to continue.

Configure X-Cart Database Settings

Configure X-Cart Database Settings

14. Wait for the installation process to complete and you will see two links for accessing X-Cart Administration zone (backoffice) panel and X-cart frontend (Customer zone) of your store, as illustrated in the below image.

X-Cart Installation Completed

X-Cart Installation Completed

15. Visit your X-cart store frontend, by hitting on Customer zone link. You can also visit the store frontend by navigating to your server IP address or domain name to /shop URL as shown in the below example.

X-Cart Shopping Store

X-Cart Shopping Store

16. Next, go back to server console and secure your X-Cart backed admin panel, by issuing the below commands:

# chown -R root /var/www/html/shop/etc/
# chown root /var/www/html/shop/config.php

17. Finally, access X-Cart backed panel by hitting on Administrator zone (Backoffice) link or by navigating to your server IP address or domain name via HTTP protocol to /shop/admin.php URL, as shown in the below example.

X-Cart Admin Login

X-Cart Admin Login

18. After logging in to X-Cart backed admin panel with the credentials configured during the installation process you should activate your X-Cart edition and start managing your online store.

X-Cart Admin Dashboard

X-Cart Admin Dashboard

Congratulations! You have successfully installed and configured X-Cart e-commerce platform in your server.

Facebook Comments

More Stuff

Emblematic Group and Mozilla Team Up to Showcase Next Generation o... Everything you share on the internet is a story. You read blog posts and watch videos that make you feel connected to people across the world. Virtual...
Latest Firefox Release is Faster than Ever With the introduction of the new Firefox Quantum browser in 2017 we changed the look, feel, and performance of our core product. Since then we have la...
Competing without a Marketing Budget: When All You Have is a Produ... This is a story about the power of a good landing page, PR efforts, and marketing strategy. The refreshing twist here is that instead of explaining ho...
The Ongoing Fiasco and Mysterious Afterlife of QuadrigaCX I’d say you were a little late to the cryptocurrency party if you haven’t heard about the ongoing catastrophe that’s been QuadrigaCX these past six ...
Spread the love

Posted by News Monkey