How to Install OpenCart on localhost

How to Install OpenCart on localhost

OpenCart installation on localhost is quite easy. If you’re beginning with a store/website development using CMS, then I would suggest you to begin with installation on  localhost. It has some simple steps, which are shown below. First, we will learn about the software requirements to install OpenCart for online store development, then we will see how to install OpenCart.

What you need for Installation

Here, we will learn how to install OpenCart. For installation, we need XAMPP, an open source cross-platform web server solution stack package. XAMPP, developed by Apache Friends, provides a server i.e. Apache, and database i.e. MariaDB (formally MySQL), and PHP.

For starting working on OpenCart, you need the following software/ tools on localhost:

  • OpenCart: A free Ecommerce solution, to start creating online cart.
  • XAMPP: It is a cross platform open source web solution package, that fulfils your need of,
    • Web Server
    • MySQL
    • PHP

Installing OpenCart on localhost

We’re learning OpenCart installation from scratch, so first we need to install it on localhost. Here are the steps,

Step 1– Go to the XAMPP official website and download XAMPP,

Step 2– Install XAMPP at any location.

We’re installing in C: Drive as shown below,

Step 3– Create a project folder in the following htdocs directory, C:\xampp\htdocs\.

We created a folder Studyopedia,

We’re done with installation of XAMPP.

Now, we will learn how to download and install OpenCart.

Download and Install OpenCart

To start installation, first download OpenCart.

Step: Go to the following link and download OpenCart,

After clicking Download Now  above, the OpenCart download starts.

Step: After downloading, unzip OpenCart under the new project folder created at,

We created a project folder with the name, Studyopedia, under xampp/htdocs,

Remember, only the contents of the upload folder is to be placed and you can remove the upload folder directory and past its content under your new project folder. This will make the following location of your open cart files,

Here are the files under studyopedia directory,

Create Database for OpenCart Store

Step: Also, create a new database in localhost/phpmyadmin. We created a new one with name ocdb,

OpenCart Installation Starts

Now, go to a web browser and click http://localhost/studyopedia/, then press enter.

Now you can see the following license agreement,

Read the above, and then click Continue,

Step: Now, the second step is visible. If you receive the following error,

You may also get this error,

Then change the file names to config.php at,
xampp\htdocs\studyopedia\admin\config-dist.php and xampp\htdocs\studyopedia\config-dist.php,

After doing the changes click CONTINUE,

Step: Now, the configuration options are visible, where you need to add the database and administration details,

Here are details added above,

Database Connection Details
DB DriverMySQLiDatabase Driver
HostnamelocalhostHost name
UsernamerootUsername for database
PasswordPassword for database
DatabaseocdbDatabase name
Port3306Port Number
Prefixoc_Table Prefix
Administration Details
UsernameLearnerOneAdmin Username
Password(Enter password here)Admin Password
Email(Enter email here)Admin Email-id

Step: OpenCart Installed successfully

As mentioned above, delete the install directory,

In this lesson we learned how to install OpenCart on localhost on Windows. In the next lesson we will learn how to visit OpenCart store for the first time.

OpenCart Introduction
Visit OpenCart Store Home page
Studyopedia Editorial Staff
Studyopedia Editorial Staff

We work to create free tutorials for all.

No Comments

Post A Comment