OpenCart

How to install OpenCart 3 on Windows and Linux

In this tutorial I will show how to install OpenCart in its version 3 on a server with PHP. You can mount it directly on a server in production, or on your localhost for testing.

Downloading OpenCart

Go to the official download page and click Download now.

Download opencart 3

That will give you a zip that has a folder called Upload. Inside that folder is everything that is necessary, and what you have to upload to the server, but first let’s see some preparations.

MySQL Database

We must have a username and password to access MySQL or MariaDB; in addition to a clean database (and the user must have access to it) where OpenCart will work.

The upload folder and our public folder

Test server

If you are in XAMPP, your public folder is htdocs, inside it create another folder and put the upload content there (since we are going to test, it is not a server in production).

Production server

In case you use cpanel, your public folder is public_html, put all the upload content there (do not put the folder, put its content in public_html).

That will make your main domain enter the store; if you want to put it in a subdirectory you are free to create it and put the content there.

If you use another type of hosting this may vary, and if it is a Linux server then it goes to/var/www/html….

Folder example

As I am doing local tests I will create a folder called “tienda” in htdocs, its content and route is as seen in the image below.

OpenCart Public folder example

Remember that the content was copied from the upload folder that is in the zip.

Now that we have already copied it, it is time to start the installation,

OpenCart install guide step by step

Let’s see how to Install OpenCart.

0 – Rename files

You have to rename two files. The first one is called config-dist.php, we’re going to change it to config.php

The second one is inside admin and it’s called config-dist.php too, we’ll also rename it to config.php

Just to confirm, now in the root it should be config.php and in admin one called config.php

1 – Access to website

It’s time to access that folder from the browser. If you are on localhost then it is localhost/ tienda; and if it is a custom domain, enter that domain.

We will begin the installation by accepting the license. If you accept it, click Continue. If not, then you can not install the software.

1 – License agreement

2 – Language requirements and extensions

In the next step OpenCart verifies that our environment is compatible and that the necessary PHP extensions are also enabled; all of them must have the green icon.

2.1 – PHP requirements for OpenCart

In the bottom part it will make a check of the files and folders.

If you are in Linux and get errors in the files make sure to give write and read permissions.

If you look there are the files that we rename at the beginning.

2.2 – Directories and files for OpenCart

When you are ready click Continue.

3.1 – The database

It is time to indicate the access credentials and the name of the database that will be used by OpenCart.

In DB Driver choose MySQLi, because in the end we will not touch the code and that extension is fine.

In hostname leave it as it is ( even if you are on the internet) unless your MySQL server is somewhere else; the same applies to the port.

3.1 Configure database for OpenCart 3

The prefix is the prefix of the tables within the database, leave it like this or remove it if you do not want prefixes.

Finally, type your MySQL username and password.

3.2 – The OpenCart admin

Below you will find a form for the OpenCart administrator, this has nothing to do with the credentials of the database. You can leave the username as admin or change it.

3.1 Configure admin account for OpenCart 3

Choose a secure password and write a true email; when you’re ready click on Continue.

4 – Wait until OpenCart installation finish

Depending on the power of your server the process will take a little longer or a little less, be patient and wait for the installation to finish.

When it finishes, the following will be displayed:

4 – OpenCart installation finished

You can click on both options; to go to the store click on Go to your online shop and to go to the control panel click on Login to your administration.

Please open a new tab for the administration.

5 – Delete install folder

In the screenshot above we see a warning to delete the install folder, so we delete it ; all this is for safety:

5 – Delete install folder

With that we have finished the installation, now we will see other details.

Admin dashboard

To access the panel go to the address of your store but add /admin. In my case it is localhost/tienda/admin.

Login with the credentials that we configured previously (not those of the database, the others):

5.1 – First login on OpenCart 3

Click on Login.

OpenCart storage folder

This wonderful software recommends us to change the location of the storage directory; removing it from public access.

You will see the alert when you log in, click on Move with the option it offers.

In this way the storage will be a folder above the public one:

5.2 – Move storage folder

Wait until it finishes moving, it will show an alert and then you can close the window. If you generate an error, try changing the route.

5.3 – Storage dir moved successfully

A first look at our first store created with OpenCart

Now we can visit our store navigating to the domain where we host it; in my case it’s localhost/tienda and it looks like this:

6 – First online store created with OpenCart

That is what our customers will see. By default there are already some products, we will see how to edit one.

Modify our first product

Let’s go back to the control panel. There navigate to Catalog> Products and edit any product with the blue button.

6.2 – Go to product admin

That will take you to a new interface. Change some data and click on the button to save.

6.3 – Save product changes – OpenCart

Now go back to your store and find the product that we just published:

6.4 – Updated product list – OpenCart

Congratulations, you have edited your first product.

Conclusion

Throughout this tutorial we saw how to install OpenCart in a Windows environment, but this applies completely to other servers and operating systems that meet the requirements.

The next step is to start selling your products, familiarize yourself with the software and grow online.

I hope to write more tutorials about OpenCart, both about its use and its code.

If I do it in the future, I will do it under the OpenCart category.


I am available for hiring if you need help! I can help you with your project or homework feel free to contact me.
If you liked the post, show your appreciation by sharing it, or making a donation

parzibyte

Freelancer programmer ready to work with you. Web, mobile and desktop applications. PHP, Java, Go, Python, JavaScript, Kotlin and more :) https://parzibyte.me/

Compartir
Publicado por
parzibyte

Entradas recientes

Receipt designer for thermal printers – Free and open source

In the last months I have been working on a ticket designer to print on…

4 months hace

JavaScript: store and read files with the Origin Private File System

In this post you will learn how to use the Origin Private File System with…

7 months hace

JavaScript: download file with fetch

In this post you will learn how to download a file in the background using…

7 months hace

SQLite3 with vanilla JavaScript and OPFS – Hello world

In this post I will show you how to use SQLite3 directly in the web…

9 months hace

Python Thermal Printing: A Comprehensive Guide for Printing on Thermal Printers

In this tutorial, we'll explore how to effortlessly print receipts, invoices, and tickets on a…

10 months hace

Image printing on Thermal printer

When printing receipts on thermal printers (ESC POS) sometimes it is needed to print images…

10 months hace

Esta web usa cookies.