How to Install LiteCart Shopping Cart Platform on Ubuntu 16.04

LiteCart is a free and open source shopping cart platform written in PHP, jQuery, and HTML 5. It is a simple, lightweight, and easy to use e-commerce software platform. LiteCart is quite fast compared to other shopping cart solutions and offers a user-friendly admin panel.

Here, we will learn how to install LiteCart on an Ubuntu 16.04 server.


  • A newly deployed Vultr Ubuntu 16.04 server instance.
  • A non-root user with sudo privileges setup on your server.
  • A static IP address configured on your system.

Step 1: Update the System

First, update your system to the latest stable version by running the following command:

sudo apt-get update -ysudo apt-get upgrade -ysudo reboot

Step 2: Installing LEMP Stack

First, you will need to install Apache, MariaDB, PHP 7 and other required PHP modules on your server. You can install all of them by running the following command:

sudo apt-get install apache2 mariadb-server php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-mysql php7.0-gd -y

Once the installation is complete, start MariaDB and Apache services. Also configure these services to start at boot time.

sudo systemctl start mysqlsudo systemctl start apache2sudo systemctl enable mysqlsudo systemctl enable apache2

Step 3: Configuring MariaDB for LiteCart

By default, the MariaDB installation is not secure. You will need to secure it before continuing. Run the following script:

sudo mysql_secure_installation

Answer all of the questions as shown below:

Enter current password for root (enter for none): EnterSet root password? [Y/n]: YNew password: <your-password>Re-enter new password: <your-password>Remove anonymous users? [Y/n]: YDisallow root login remotely? [Y/n]: YRemove test database and access to it? [Y/n]: YReload privilege tables now? [Y/n]: Y

Once the MariaDB installation has been secured, you will need to create a database for LiteCart.

First, login to the MySQL shell with the following command:

mysql -u root -p

Enter your root password to login. Then create a database for LiteCart with the following command:

MariaDB [(none)]> create database litecartdb;MariaDB [(none)]> grant all privileges on litecartdb.* to lcuser@localhost identified by 'yourpassword';MariaDB [(none)]> flush privileges;MariaDB [(none)]> exit;

Step 4: Installing LiteCart

You can download the latest stable version of the LiteCart from the offical site. Once the download has completed, extract the downloaded zip file to the Apache web root directory.

cd ~/Downloadsunzip -d /var/www/html/

Next, change the ownership and permission of the Apache web root directory:

sudo chown -R www-data:www-data /var/www/htmlsudo chmod -R 755 /var/www/html

Step 5: Configuring Apache for LiteCart

You will need to create an Apache virtual host directive for LiteCart. Open the virtual host file:

sudo nano /etc/apache2/sites-available/litecart.conf

Add the following lines:

<VirtualHost *:80>ServerAdmin    DocumentRoot /var/www/html/litecart/    ServerName    Options FollowSymLinks    AllowOverride All    Order allow,deny    allow from all    ErrorLog /var/log/apache2/litecart_error_log    CustomLog /var/log/apache2/litecart_access_log common</VirtualHost>

Save and close the file. Then enable the virtual host with the following command:

sudo a2ensite litecart.conf

Finally, restart the Apache service:

sudo systemctl restart apache2

Step 6: Accessing LiteCart web installation wizard

It’s time to access LiteCart’s web installation wizard.

Open your web browser and navigate to Populate the install fields with the details shown below.

  • Database Type : MySQL
  • Hostname : localhost
  • Database : litecartdb
  • Username : lcuser
  • Password : yourpassword
  • Table Prefix : lc_

  • Store Name : New Store

  • Store Email :
  • Country : India
  • Time Zone : Asia/Kolkata

  • Folder Name : admin

  • Username : admin
  • Password : admin@123

Once you are done, click the Install Now button.

After the installation finishes, log into the LiteCart web interface with username admin and the password admin@123.

Congratulations! You have successfully installed LiteCart on your Ubuntu 16.04 server.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.