How to Install Opencart on localhost

OpenCart is a free, open-source shopping cart. In this tutorial on OpenCart we will walk you through on how to install OpenCart on localhost successfully.

Do you know about OpenCart?

OpenCart is an open source e-commerce solution built on PHP that can be used to start online stores easily. OpenCart is feature rich, easy to use, search engine friendly and with a visually appealing interface can be used “out of the box” .

With Inbuilt support for multiple payment gateways, I believe  this can meet your needs if you want to start an Online Shopping Portal.

Now lets proceed into OpenCart Installation process :

Installing OpenCart is easy & it takes less than 5 minutes of time to complete OpenCart Installation.

First Download and unzip OpenCart into Local Machine.

At the time of writing this tutorial OpenCart version is  You can Download the Latest version of OpenCart from OpenCart website (recommended) or directly from github. The name of the file will be

1) After you download and unzip OpenCart package( you should get following files structure:

  • “upload” folder
  • “license.txt” file
  • “readme.txt” file

opencart_installing_on_localhostThe “upload” folder contains all the files needed to upload OpenCart to a web server. The “license.txt” file contains the license agreement regarding the use of OpenCart on your site. The “readme.text” file provides links to the current install and upgrade instructions on the OpenCart website. When you are ready, you can extract the files from the zip file to a location of your choice on your computer.

On my Local Machine I had installed XAMPP Version: 1.8.1.

2) Now please upload all the content of the upload folder to your local hosting folder: (WAMP, XAMP, LAMP and others).

On my Local Machine I had extracted the files under E:\xampp\htdocs\opencart

3) Now you can start the installation by accessing http://localhost/opencart.  Check “I agree license” and press “Continue” button

OpenCart Installation on Localhost

4) Now OpenCart checks for the requirements & lets you know if anything required is missing. In the below  screenshot opencart is looking for config.php file.

We need to rename default config-dist.php to config.php under root & Admin folder of Opencart.

OpenCart pre Installation requirements

5) The next step is to create a database on the MySQL server for OpenCart to store a shop’s data on.

6) Now fill in the Database Details & Admin Credentials in your OpenCart Installation.

OpenCart - Installation - Enter Database Information

7) That’s It. Congratulations! You have successfully installed your OpenCart shopping cart on your localhost!. Delete the Folder named install from your setup

OpenCart - Installation Finished

7) You can access OpenCart Admin Panel using the url.  http://localhost/opencart/admin/

Open Cart Administration Console

8) You can access OpenCart Home Page using the url.  http://localhost/opencart/

Opencart Default Home Page


Please contact us if you have any issues in installing/configuring OpenCart on your Local Machine or your Hosting Server, we can help you with troubleshooting the installation.

Feel free to  comeback to our site for more OpenCart Tutorials.

  • Idorenyin

    Nice article! I have done mine thank you. Please how do I go about transferring from my xampp to a live hosting server? I just built multi stores with it

    Thank you,

  • yusuf

    pls am having issues installing opencart its telling me “Warning: CURL extension needs to be loaded for OpenCart to work!”

  • Joseph Adediji

    Please follow the below to resolve the issue.
    1) download and install libcurl / curl for windows: Click here to download and grab the contents to the below given path.
    2) Paste the zip file content into C:\wamp\bin\apache\apache2.2.6
    3)Locate and open your php.ini file (resides in C:\wamp\bin\php\php5.2.5)
    4) In your php.ini file, change/ uncomment the following line:
    ;extension=php_curl.dll (you do so by removing the semi-colon),

  • scttr

    Very helpful, thank you!

  • Zoran

    Hello, I cant log in my admin panel, I follow the instruction, finished the instalation, but when i type user name and password in admin section i get no respond.
    Please help.
    Best regards.

  • Thank you very much

    I got it very useful

  • i want to know how to install an open cart online to the website of my choice through filezilla and to be able to effect it.need be said,i have uploaded it.

  • i will like to know how to upload and be able to effect it online.i have been able to upload to the domain through filezilla but couldnt effect. and have even created a new database

  • Leila Mohd

    Hi, I had Opencart 1.5 and just downloaded version 2. To install opencart 2, I deleted the old files in the upload folder and replaced them with the new ones. When I ran the installation, I got the message ‘Can’t connect to local MySQL server through socket ‘ Applications/MAMP/tmp/mysql/mysql.sock’ (2)’ on the DB screen.

  • Samiran Maity

    any one tell me how to convert a local server to main server

  • Arief Shaan

    how to upload custom theme without FTP server on localserver ?

  • Hardik Shah

    Can i install opencart through coding ???
    Plz Share any idea
    i want to install opencart theme using php codeing