• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How To Install OpenCart On A Vultr LEMP Server

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
49
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Before further reading, you need to:
  2. Step 1: Setup a database for OpenCart
  3. Step 2: Download the OpenCart package
  4. Step 3: Prepare the OpenCart installation files
  5. Step 4: Install OpenCart from your browser
  6. Step 5: Some basic security practices
  7. Conclusion
  8. Want to contribute?


OpenCart is a popular open source shopping cart solution designed to provide excellent functionality, ease of use, and appearance. With OpenCart, you can easily build an online store on a LAMP- or LEMP-based server.

In this tutorial, we will introduce how to install OpenCart on a Vultr LEMP server instance.

Before further reading, you need to:

  • Deploy a fresh server instance with the one-click Vultr LEMP App.
  • Log in as a sudo user from your SSH terminal.

Step 1: Setup a database for OpenCart

Find the default MySQL credentials of Vultr LEMP:

sudo cat /root/.my.cnf

Use the credentials displayed on the screen to log into MySQL:

mysql -u root -p

Create a database in the MySQL shell with the following commands. Be sure to replace the database name “opencart”, the user name “opencartuser”, and the password “opencartpassword” with your own ones.

CREATE DATABASE opencart;
CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'opencartpassword';
GRANT ALL PRIVILEGES on *.* TO 'opencartuser'@'localhost' IDENTIFIED BY 'opencartpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 2: Download the OpenCart package

Download the latest stable version of OpenCart, which as of writing is 2.1.0.2, from its github repository:

cd ~
wget https://github.com/opencart/opencart/archive/2.1.0.2.tar.gz

Unzip the OpenCart package, delete the default files in your server’s Web directory, and then move necessary files into it:

tar -zxvf 2.1.0.2.tar.gz
cd /usr/share/nginx/html/
sudo rm background.jpg index.php logo.png
sudo cp -R ~/opencart-2.1.0.2/upload/* .

Step 3: Prepare the OpenCart installation files

Setup the configuration files:

sudo mv config-dist.php config.php
sudo mv admin/config-dist.php admin/config.php

Modify the ownership of each installation file:

sudo chown -R nginx:nginx ./*
sudo service nginx restart

Step 4: Install OpenCart from your browser

Visit http://[your-server-ip] from your browser to continue the installation.

First, click the “Continue” button to agree the license.

On the second screen, check server requirements for installing OpenCart. With a Vultr LEMP server instance configured as above, these requirements are already satisfied. Click the “Continue” button to move on.

On the third screen, input the database name, the database username, and the database password you have setup in step 1, then fill in a username, a password and an email address for administration. Click the “Continue” button to finish the installation.

Step 5: Some basic security practices

For security purposes, you should also perform the following instructions on your machine.

Delete the “install” directory:

sudo rm -r /usr/share/nginx/html/install

Rename the “admin” directory to a name which is hard to guess, like “c2tdfjk”:

sudo mv admin c2tdfjk

Modify the “config.php” file in the “c2tdfjk” directory, replace every instance of “admin” with “c2tdfjk”:

cd c2tdfjk
sudo sed -i "s/admin/c2tdfjk/g" config.php

In the future, you can only access your admin panel from “http://[your-server-ip]/c2tdfjk”.

Conclusion

Now, you can visit your new online store from “http://[your-server-ip]”. Enjoy it.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Mattermost 4.1 on CentOS 7

Next Post

Creating a Jekyll Blog on CentOS 7

Next Post

Creating a Jekyll Blog on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet