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,

Download XAMPP for OpenCart

Step 2– Install XAMPP at any location.

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

Install XAMPP on system for OpenCart

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

We created a folder Studyopedia,

Create project folder in htdocs for OpenCart

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 2.3.0.2,

Official OpenCart download link

After clicking Download Now  above, the OpenCart download starts.

Step: After downloading 3.0.2.0-OpenCart.zip, 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,

OpenCart zip files unzipped in the project folder

Create Database for OpenCart Store

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

New Database created for OpenCart Store

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,

How to Install OpenCart on localhost

Read the above, and then click Continue,

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

OpenCart Installation Config error- files missing

You may also get this error,

OpenCart Installation Warning- config.php does not exist.

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,

Pre-installation step for OpenCart Installation

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

Adding configuration details for OpenCart

Here are details added above,

FieldValueDescription
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

OpenCart Installation completed

As mentioned above, delete the install directory,

Delete the install directory after OpenCart Installation

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
contact@studyopedia.com

We work to create programming tutorials for all.

3 Comments
  • Andy
    Posted at 20:50h, 11 June Reply

    Really good and extremely useful tutorial

  • Puru
    Posted at 00:51h, 02 July Reply

    the configuration taking too much time and the config file is empty

  • t
    Posted at 00:10h, 13 May Reply

    thank you!

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading