How to install OpenCart on a Linux Server

opencartOpenCart is an easy to use and search engine friendly open source PHP based online shopping cart for all Internet merchants who want to create their own online business and participate in e-commerce.

This install guide assumes that Apache, MySQL and PHP 5 are already installed and configured on one of our Linux Virtual Server hosting plans.

Open the PHP configuration file (php.ini) and check if ‘Register Globals’, ‘Magic Quotes GPC’ and ‘Session Auto Start’ settings are set to Off and the ‘File Uploads’ setting is set to On. In order to find the location of ‘php.ini’ configuration file, execute the following command:

# php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

Also, make sure that PHP is compiled with the following extensions: MySQL, GD, cURL, mCrypt and ZIP.

Download OpenCart from the OpenCart website ( . At the time of writing this tutorial, the latest stable version is OpenCart

cd /var/www/html/
unzip v1.5.5*

Log in to the MySQL console and create a database called ‘opencartdb’, assign a user to it, and assign the user ALL Privileges:

mysql> create database opencartdb;
mysql> GRANT ALL PRIVILEGES ON opencartdb . * TO opencart@’localhost’ IDENTIFIED BY ‘xxxxxx’ WITH GRANT OPTION;
mysql> flush privileges;

Do not forget to change ‘xxxxxx’ with your ‘opencart’ MySQL user password.
Alternatively, the MySQL database for the OpenCart shopping cart system can be created using phpMyAdmin.

Execute the following commands:

mv opencart- opencart
chgrp apache -R opencart/
cd opencart
mv upload store
cd store
mv config-dist.php config.php
mv admin/config-dist.php admin/config.php

Make sure the following files and directories are writable for your web server user:


Open http://<>/opencart/store/ in your favorite web browser, follow the onscreen instructions and complete the installation.

opencart installation - step2

Do not forget to delete the install directory after the installation is complete for security reasons.

The administrator back-end is now available at http://<>/opencart/store/admin/

How to install OpenCart on a Linux Server
Written by: AFRIDA YANTI
Reting: 4.9

Cheap Best Hosting is a leading provider of web hosting, shared hosting, resellers hosting, virtual private servers, vps hosting, dedicated servers and domain name registration.

Follow me on Google+ | Twitter | Facebook | Linkedin | YouTube

Share This Post

Recent Articles

Leave a Reply

© 2019 Cheap Best Hosting Blog. All rights reserved. · Entries RSS · Comments RSS
Hosting By Cheap Best Hosting