In today’s commerce industry, having an ecommerce store is essential, but some e-commerce solutions might be really expensive or require extra skills.

If you are a person who does not know how to code or would like to know how to optimize a server for ecommerce quickly, then OpenCart might be for you.

In this tutorial, we are going to show you how to install OpenCart manually on a remote Linux server.

What is OpenCart?

The OpenCart software provides a simple way for you to run an e-commerce website. It offers professional e-commerce features such as an admin panel, discounts, coupons, multi-store support, ordering customization, and more.

It is a free online store management system based on open-source software such as PHP and MySQL. In 2017, it had more live sites operating on the internet than Shopify or Magento, which was roughly 9 years after its first release.

OpenCart is considered to be one of the top online store management systems. With its easy-to-use admin panel and tons of extensions available to install within a few clicks, it is no wonder why more than 342,000 online stores still use it as part of their business infrastructure and ecommerce hosting solution.

Why should I choose OpenCart?

Whether you have no coding experience or need to quickly set up an e-commerce website, OpenCart offers something beneficial for everyone, including web developers, who can easily edit the frontend while having a professional backend logic that can identify fraught orders and process orders and payments.

Benefits of OpenCart

  • Ease of use
  • Free & open-source
  • Anti-fraud detecting system
  • SEO friendly
  • Sell anything
  • Full control over your site

Before we begin

Now that we’ve covered some basic information regarding OpenCart, it’s time to get our hands dirty. First, you need to have access to a Linux server, which you can easily deploy as part of a cloud vps solution. Or if you need to do a little more research, take a look at the cost of a server for small business.

See Also: Experience Our for Free VPS Hosting: Enjoy a 30-Day Trial with Risk-Free Servers

Installation steps

SSH into your remote Linux server

The very first step is to SSH into your remote Linux server, but if you are not using a remote server then you can skip this part.

To SSH into a remote server use this command:

ssh -i [.PEM_FILES_LOCATION] [USERNAME]@[IP_ADDRESS]
image 9 33954ea293

Update Linux packages

Now that you have access to your server the first step is to update you linux packages by typing these commands below

sudo apt-get update
sudo apt-get upgrade
image 14 33959a4a45

Install necessary packages

Now you need to install 4 main packages that are necessary for installing OpenCart, but if you already have them installed make sure that they are supported by OpenCart.

Install Apache server by typing this command:

sudo apt install apache2
718d89f1 31ce 42de a3b1 44f510094ac5 4

Why? Because we need the apache web server to serve our OpenCart software on the server.

OpenCart uses MySQL as a database, which is why we need to install it by running this command:

sudo apt install mysql-server
718d89f1 31ce 42de a3b1 44f510094ac5 5

Now we need to Install PHP and a few other libraries required for OpenCart. If you already have PHP installed, make sure that the PHP version is version 8 or later.

sudo apt install php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear
718d89f1 31ce 42de a3b1 44f510094ac5 6

The last package that you need to install is unzip, which is required to unzip the OpenCart folder later on.

To install unzip type the below command:

sudo apt install unzip
718d89f1 31ce 42de a3b1 44f510094ac5 7

Create a database

Now that you have MySQL installed it’s time to configure it and make a new database for OpenCart.

First of all gain access to your MySQL shell with the root user by typing this command below

sudo mysql -u root -p
718d89f1 31ce 42de a3b1 44f510094ac5 8

Hint: if you don’t have any password for your root user then click enter to continue.

Create a new database by the name of open_cart using the below command

create database open_cart;

Create a new user with a password

create user '[USERNAME]'@'localhost' identified by '[PASSWORD]';

Give your user access to the newly created database, by entering these commands:

grant all on open_cart.* to '[USERNAME]'@'localhost';

and

flush privileges;

Your MySQL database is all set up, now you need to exit the shell

exit;
718d89f1 31ce 42de a3b1 44f510094ac5 9

Creating a new directory

It’s now time to make a new directory inside /var/www/ folder.

sudo mkdir /var/www/opencart
image 10 33955f6d8e

After creating the directory you need to cd into it.

cd /var/www/opencart
image 12 33957baa6d

Download OpenCart files

Now you need to download OpenCart files inside the new folder by entering the following command:

sudo wget https://github.com/opencart/opencart/archive/master.zip
718d89f1 31ce 42de a3b1 44f510094ac5 10

Then you need to unzip it using the library that we have installed previously.

sudo unzip master.zip
image 17 3396289b96 33962f6ef9

By unzipping the OpenCart zip file, it creates a new file by the name of opencart-master which contains all the necessary files that we need. You can check it by typing ls on your terminal.

ls

Give OpenCart permission

Now give the opencart directory permission by typing these commands:

sudo chown -R www-data.www-data /var/www/opencart
sudo chmod -R 755 /var/www/opencart
image 18 33963c40ae

Configure OpenCart with the Apache server

The default apache root is /var/www/html/ but we have our OpenCart files in /var/www/opencart/opencart-master/upload/. So to change the default root directory we need to tell apache that we want our default directory to change.

Thus you need to run the below command to edit a new file by the name of opencart.conf:

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

It now opened up a new blank file and we need to type the following on the new file:

<Virtualhost *:80>
        Documentroot /var/www/opencart/opencart-master/upload
<directory /var/www/opencart/opencart-master/upload>
allowoverride all
allow from all
</directory>
</Virtualhost>
718d89f1 31ce 42de a3b1 44f510094ac5 11

After writing those on the file you need to:

  • press control+x
  • then choose yes
  • then press enter to save the file

The next step would be to disable the default site access by typing the command below:

sudo a2dissite 000-default.conf

Now we need to enable access to OpenCart by enabling the newly created file:

sudo a2ensite opencart.conf

After that, we need to rewrite these changes:

sudo a2enmod rewrite
718d89f1 31ce 42de a3b1 44f510094ac5 12

The last step would be to restart the apache server by typing the command below

sudo systemctl restart apache2
718d89f1 31ce 42de a3b1 44f510094ac5 13

Congratulations! You have now successfully created an OpenCart website. If you did not receive any error messages, then you shall see this page when you enter you server’s IP address on a web browser.

image 13 33958ac6e9 33958a7c0a

Configuring OpenCart

After successfully opening your OpenCart website on your browser, you would be showed all the requirements before pursuing to operate OpenCart.

image 15 33960f2716

Fixing the config.php file’s issue

By default everyone would be missing those last two requirements on the OpenCart requirements page, but don’t worry, we’ll now show you how to fix it up.

First of all change your directory to /var/www/opencart/opencart-master/upload

cd /var/wwww/opencart/opencart-master/upload

Then change the file name of the config-dist.php to config.php by typing the following command:

sudo mv config-dist.php config.php
718d89f1 31ce 42de a3b1 44f510094ac5 14

Now we need to do the same process again with the admin folder by typing these commands:

cd /admin
sudo mv config-dist.php config.php
718d89f1 31ce 42de a3b1 44f510094ac5 15

After that, reload your browser and you will see the error message not appearing anymore.

image 16 339610c781

Database connection

The last step toward getting your OpenCart store set up is to connect it to your previously created MySQL database.

Database details:

  • Username is open_cart_user
  • Database is open_cart
  • Password is your previously given password

Administration details:

  • Username, password and email is whatever you choose
718d89f1 31ce 42de a3b1 44f510094ac5 16

Finished

Congratulations again! You have now successfully created and configured your OpenCart store. Now you have your admin panel and website all set up.

image 19 3396999082

Admin Panel

You can easily gain access to your admin panel by navigating to the /admin page and entering your admin credentials to log in.

image 11

The first time that you open your admin panel you have to do a few things:

Delete your installation directory by just clicking the delete button.

718d89f1 31ce 42de a3b1 44f510094ac5 17

Move your storage directory outside of your web directory by just clicking the move button.

718d89f1 31ce 42de a3b1 44f510094ac5 18

Next Step

Now you can easily manage your website with the admin panel, add products, get orders and much more.
See Also: Experience Our for Free VPS Hosting: Enjoy a 30-Day Trial with Risk-Free Servers

Conclusion

OpenCart indeed is a really suitable and stable choice for roughly anybody who intends to run an online store. With it’s neat and professional features it can fulfill nearly any e-commerce need.

Find out more about hosting and deploying applications in the cloud by visiting our Knowledge Base for the latest tutorials and how to videos.

What are your feelings

COMPLETE DIGITAL SERVER SOLUTIONS FOR ALL

Bare Metal Dedicated Servers

A single tenant, physical server allowing you full access to its resources

Read More

Cloud VPS

The cheapest way to get your own independent computing instance.
Read More

Cloud VDS

Virtualized server platform hosted on enterprise-grade physical servers
Read More

10 Gbps Unmetered Servers

Zumiv offers high bandwidth dedicated servers up to 20Gbps.
Read More
free vps hosting qca50satdzdvwwiktdobzdsj43rc5tgslgo4e8d8lg

ZOMIV NEWSLETTER

Receive the latest news, updates and offers. You can unsubscribe at any time.

ZOMIV NEWSLETTER

Receive the latest news, updates and offers. You can unsubscribe at any time.

zomiv footer logo

HOSTING REDEFINED

44-7-441-399-305
Support Hours: 24x7x365
Sale Office Hours: M-F, 7AM-5PM EST

We accept the following:

visa
mastercard
paypal
download (6)

PRODUCTS

SERVICES

© Copyright 2024, All Rights Reserved by DataCamp Int Limited.

zomiv is a trading name of DataCamp Int Limited. Registered Office: 71-75 Shelton Street, Covent Garden,
London, United Kingdom, WC2H 9JQ. Registered Number 15527709. Registered in England and Wales.
certifications

ZOMIV NEWSLETTER

Receive the latest news, and offers. You can unsubscribe at any time.

  • PRODUCTS
  • LOCATIONS
  • SOLUTIONS
  • COMPANY