How to install OpenCart on LAMP/WAMP Server?
In the previous article What is OpenCart, We have learned fundamentals of OpenCart, OPenCart important features, and major advantages of using OpenCart framework. This How to Install OpenCart guide will teach you detailed steps to properly install OpenCart on a fresh system.
The best approach to learn any new framework is to first install it on localhost and start exploring and experimenting. Similarly, to master OpenCart Framework and start building e-commerce websites, first, download & install OpenCart framework. Here, you will learn detailed steps to download & install OpenCart on localhost as well on any hosted platform – Ubuntu, AWS, Windows. Below mentioned steps can be followed to install opencart on ubuntu platform, install opencart on amazon ec2, install opencart on xampp, install opencart on hostinger, install opencart on digital ocean, or localhost.
OpenCart Installation Requirements
OpenCart requires certain software requirements to install and operate the eCommerce store properly. First of all, a Web Server must be installed to start OpenCart installation. Domain names and hosting services can easily be purchased for an affordable price.
The following software must be installed:
- Web Server (Apache suggested)
- PHP 5.4+
- Database (MySQLi suggested)
Required PHP libraries/modules
- GD Library
Learn Laravel Tutorials:
If you are a beginner to Laravel Framework, then we recommend you to read the following topics:
- Laravel Framework Overview
- Laravel Request Lifecycle
- Top 20 Laravel Artisan Commands
- Understanding Laravel Middleware
- Laravel Routing Tutorial
- Understanding Laravel Blade Template
- Laravel Interview Questions
- Laravel Authentication
- Laravel Validation Tutorial
Steps to Install OpenCart on local/remote LAMP/WAMP server
Follow the below steps to properly install and configure OpenCart:
Step1: Download OpenCart from www.opencart.com
Go to the official website of opencart (www.opencart.com) and download the latest version.
You can use this direct link to opencart download page – OpenCart Download Page https://www.opencart.com/index.php?route=cms/download
It is always recommended to install the latest version of opencart for sake of performance and security.
Clicking on the “Download Now” button may ask you to first Signup/Sign-In
The output of this step would be .zip archive on your localhost machine.
Step2 – Extract the Downloaded OpenCart Installation Archie
Now, after successful downloaded of OPenCart installation archive, please unzip it on your local computer and navigate to the ‘Upload’ directory.
Step3 – Rename OpenCart Configuration Files
Before starting the installation, You need to first rename 2 files in order to perform successful opencart installation:
1. Rename ../upload/config-dist.php to ../upload/config.php
2. Rename ../upload/admin/config-dist.php to ../upload/admin/config.php
These files contain the database settings and root folders from the opencart is running.
Step4 – Create an OpenCart Database.
Opencart uses a database in the backend to store all the e-commerce related data – products, categories, users, reviews, ratings, orders, etc.
To create new database open phpMyAdmin on localhost – http://127.0.0.1/phpmyadmin/
create a new database named – “opencart”
Step5 – Upload OpenCart Installation folder to LAMP/WAMP root folder
If you are installing opencart on localhost machine, then copy the entire “upload” folder to
the root folder of LMAP/WAMP installation directory, In our case we have copied it to:
If you want your store to be accessible directly through a root domain name (ex: http://example.com) then you should upload the OpenCart files under the
Note: To upload opencart archive on a remote hosting machine, use FTP/SFTP program like WinSCP/FileZilla, etc.
You can use your cPanel provided hosting provider.
Step6 – Run OpenCart Automatic Installer
Before starting the installation, make sure that the upload folder is writable permission.
Now, all the preparation steps are completed, you can start the installation.
Open the browser and goto opencart upload folder – localhost/upload URL – http://localhost/upload/
Step7 – Fill Database Settings
In this step, you have to input important configuration settings in order to proceed with the installation further.
Enter your Host, Database Username, Password, and database name.
These settings should be provided to you during the database creation process or by your hosting provider.
Next, you need to input the database username and password, as well as the administrative email address for your main OpenCart admin user.
Step8 – Wow! – Run eCommerce Store
Now, you have successfully completed your OpenCart installation.
you can access your store frontend or the OpenCart admin panel via the links provided on the final page of the installation process.
Step9. Remove Installation Directory:
Please remember to remove the OpenCart Installation Directory from the OpenCart folder.
Thank you so much for reading. If you have any questions, please write in the comments section we will be happy to help you.