How to Create Own Online Shopping Store Using “OpenCart” in Linux

In the Internet world we are doing everything using a computer. Electronic Commerce aka e-commerce is one one of them. E-Commerce is nothing new and it started in the early days of ARPANET, where ARPANET used to arrange sale between students of Massachusetts Institute of Technology and Stanford Artificial Intelligence Laboratory.

These days there are some 100’s of E-Commerce site viz., Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, etc. Have you thought of making your own Amazon and Flipcart like web-based Application Server? If yes! This article is for you.

Opencart is a free and open source E-Commerce Application written in PHP, which can be used to develop a shopping cart system similar to Amazon and Flipcart. If you want to sell your products online or want to serve your customers even when you are closed Opencart is for you. You can build a successful online store (for online merchants) using reliable and professional Opencart Application.

7. Next, set correct Permissions to the files and folders of /var/www/html/opencart-master. You need to provide RWX permission to all the files and folders there, recursively.

# chmod 777 -R /var/www/html/opencart-master

Important: Setting permission 777 may be dangerous, so as soon as you finish setting up everything, revert back to permission 755 recursively on the above folder.

Step 3: Creating OpenCart Database

8. Next step is to create a database (say opencartdb) for the E-Commerce site to store data on the database. Connect to databaser server and create a database, user and grant correct privileges on the user to have full control over the database.

Step 4: OpenCart Web Installation

9. Once everything set correctly, navigate to the web browser and type http://<web server IP address> to access the OpenCart web installation.

Click ‘CONTINUE‘ to Agree the License Agreement.

Accept OpenCart License

10. The next screen is Pre-installation Server Setup Check, to see that the server has all the required modules are installed properly and have correct permission on the OpenCart files.

If any red marks are highlighted on #1 or #2, that means you need to install those components properly on the server to meet web server requirements.

If there are any red marks on #3 or #4, that means there is issue with your files. If everything is correctly configured you should see all green marks are visible (as seen below), you may press “Continue“.

Server Requirement Check

11. On the next screen enter your Database Credentials like Database Driver, Hostname, User-name, Password, database. You should not touch db_port and Prefix, until and unless you know what you are doing.

Also Enter User_name, Password and Email Address for Administrative account. Note these credentials will be used for logging in to Opencart Admin Panel as root, so keep it safe. Click continue when done!

OpenCart Database Details

12. The next screen shows message like “Installation Complete” with the Tag Line Ready to Start Selling. Also it warns to delete the installation directory, as everything required to setup using this directory has been accomplished.

OpenCart Installation Completes

To Remove install directory, you may like to run the below command.

# rm -rf /var/www/html/opencart-master/install

Step 4: Access OpenCart Web and Admin

13. Now point your browser to http://<web server IP address>/opencart-master/ and you would see something like the below screenshot.

OpenCart Product Showcase

14. In order to login to Opencart Admin Panel, point your browser to http://<web server IP address>/opencart-master/admin and fill the Admin Credentials you input, while setting it up.

OpenCart Admin Login

15. If everything ok! You should be able to see the Admin Dashboard of Opencart.

What after testing the tools?

If you have already tested the Application and finds it customizable, flexible, Rock Solid, Easy to maintain and use, you may need a good hosting provider to host OpenCart application, that remains live 24X7 support. Though there are a lot of options for hosting providers we recommend Hostgator.

Hostgator is a Domain Registrant and Hosting Provider that is very well known for the service and feature it provides. It Provides you with UNLIMITED Disk Space, UNLIMITED Bandwidth, Easy to install (1-click install script), 99.9% Uptime, Award winning 24x7x365 Technical Support and 45 days money back guarantee, which means if you didn’t like the product and service you get your money back within 45 days of purchasing and mind it 45 days is a long time to Test.

So if you have something to sell you can do it for free (by free I mean, Think of the cost you would spend on getting a physical store and then compare it with virtual store setting-up cost. You will feel its free).

Note: When you buy hosting (and/or Domain) from Hostgator you will get a Flat 25% OFF. This offer is valid only for the readers of Tecmint Site.

All you have to do is to Enter Promocode “TecMint025” during the payment of hosting. For reference see the preview of payment screen with promo code.

Note: Also worth mentioning, that for each hosting you buy from Hostgator to host OpenCart, we will get a small amount of commission, just to keep Tecmint Live (by Paying Bandwidth and hosting charges of server).

So If you buy it using the above code, you get discount and we will get a small amount. Also note that you won’t pay anything extra, infact you will be paying 25% less on total bill.

Conclusion

OpenCart is an application that performs out-of-the box. It is easy to install and you have the option to choose best suited templates, add your products and you become an online merchant.

A lots of community made extensions(free and paid) makes it rich. It is a wonderful application for those who want to setup a virtual store and remain accessible to their customer 24X7. Let me know yours experience with the application. Any suggestion and feedback is welcome as well.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Great tutorial, but why not save time and effort by using a managed hosting for hosting OpenCart? Using such hosting you can quickly and easily install OpenCart on server. There won’t be any need to worry about server management as well. Here is a tutorial that explains how easy it is: https://www.cloudways.com/blog/how-to-install-opencart-2-ssh/

Hi! Thank you very much for this tutorial!
For me, opencart installation began only after I typed in browser /opencart-master/ after my ip-adress, that’s where all opencart files are located (/var/www/html/opencart-master)

FYI:
There is an issue at step 11 if you are using MySQL as your database.
There is an error message “Database opencartdb could not be found” (or something like that).
Although you have successfully completed step 8, the problem resolves on the MySQL driver.
So you have to install the php5-mysql module (debian/ubuntu users type: sudo apt-get install php5-mysql)
This should solve the problem.

Sorry for the trouble, actually we forgot to add that php5-mysql package must be installed in ordered to communicate with PHP/MySQL. Thanks for the tip, we’ve included in the article, hope it will help others who face similar problem..

when i type ip address in the url its redirecting to apache2 default page only i cannot access OpenCart ..configuration i have done correct and permission also i have given correct . the problem i am facing in apache2 default page is coming its not redirecting to opencart