How To Correctly Install OpenCart 3 and Set It Up Properly
So you have decided to build your eCommerce store. Congratulations! I wish you many sales to come. Since this is your first step, that means we have to make sure it's done properly, if not you will end up having issues later on when you decide to make changes or install a theme or extension on your store.
In this post you will learn how to install OpenCart 3 properly on your server. This is the first in a series of post that will help you get your OpenCart store up and running smoothly so you don't run into issues later.
Table of Content
Remember to subscribe to our newsletters so you can get notified of new posts in this series.
Installing OpenCart 3
1a. Download the latest version of OpenCart 3
The first thing you'll need to do is to download the OpenCart zip file. To do this, go to the OpenCart website by visiting www.opencart.com, then click on the
Free Download button.
On the new page, click on the
Download Now button to get the latest OpenCart 3 version. As of writing the latest version is 184.108.40.206 - This will be the same regardless of which version is the latest.
(Pro Tip: If you want previous a version of OpenCart, then click on the
previous releases link to see the list)
1b. You can also download OpenCart from they official OpenCart github page.
Just visit https://github.com/opencart/opencart . Scroll down a bit until you see something similar to the image above. You can click on the
Clone or Download button, then click Download ZIP. You can also use the Open in Desktop option, but that is beyond the scope of this tutorial.
(Pro Tip: You can find previous releases by clicking on the
Releases link, like in the image above, and you will see a list of all available OpenCart versions.)
2. Extract (Upload) files to your server (or localhost)
This step is the same for both an online server (your website) and your localhost, except that your online server requires that you use an FTP program to access the folder structure.
Moving on, create a folder within your localhost server called
opencart_3 or whatever name you prefer. You might want to give it the name of your store (Pro Tip: Make sure there are no spaces in the name. Instead use underscores
my_store). Now open the file you just created.
Open the zip file that you downloaded. You will notice there are a whole much of files in there. Just ignore them, because the only folder you should care about is the
upload folder. Open the
upload folder and drag all the files you see into the
opencart_3 folder that you just created.
3. Rename your config files
The next thing for you to do is to rename the config files. The config files store some crucial OpenCart details that are necessary for accessing your site and connecting to your database. Some people carry out this step later, but it's best to do it now so you don't have to go back and forth.
Now, rename the file called
config.php. There is also another one within the admin folder that also needs to be renamed. So, open the
admin folder and also rename that
4. Create your OpenCart database
OpenCart 3 uses a database to store all kinds of data, from your products and orders to customer information and content pages.
To create the database that OpenCart will use, you need to log into your database management system, which usually is phpMyAdmin, but if yours is different the general steps might still be the same. If not you have to read the documentation that came with your own database management system.
For phpMyAdmin, Click the
Databases tab at the top of the window.
Enter the name of your database. For this tutorial we will name it
opencart_3, but you can use any name that you want. You don't need to change the second dropdown option so just leave it alone.
Then click Create.
5. Setup Your Store's Configuration
Remember in Step 3 we renamed those config files? This is where OpenCart will need them.
Open your browser and go to
localhost/opencart_3 (change the
opencart_3 to whatever you named your folder in step 2). You will see something similar to the image below. Then accept the terms and conditions page.
The next page is where you will enter your database settings and login details for your main admin account.
Use the following settings:
- DB Driver: Select MySQLi or mPDO (if you are not sure which to select, then select MySQLi)
- Hostname: localhost
- Username: root (if this is on your web server, then check your hosting details for your database username)
- Password: -enter your password- (if this is on your web server, then check your hosting details for your database password)
- Database: opencart_3 (use the name you entered in Step 4 above)
- Port: 3306
- Prefix: oc_ (You can change this to anything you like but as a guide, always use something unique just in case you want to install another CMS or software that uses the same database. So you will want this to be different from that one so you do not run into issues. Also, remember to enter an underscore
_at the end of the prefix as you see)
- Username: -choose a username for your admin store-
- Password: -choose a password for the admin user-
- Email: -enter your email address-
You can now go to
localhost/opencart_3 to see your brand new store. But the work is not yet over!
6. Securing & cleaning up your OpenCart website!
You have now successfully installed your brand new OpenCart 3 store and you should be proud of yourself!
You now have to manually delete the
install folder on for security reasons. So open you
opencart_3 folder and look for the
install folder. Delete it.
Now in your browser, go to
localhost/opencart_3/admin to access your admin with the username and password you created in Step 4 above. Since this is the first time of logging in, you will see a message saying "It is very important that you move the storage directory outside of the web directory".
Don't worry about this, it's extremely easy to do.
This message is just asking you to move your
Storage folder from within the
system folder to outside of your web root for security reasons. You can do this automatically by selecting
Automatically Move or manually by selecting
I suggest you use Automatically Move first so OpenCart will handle the move for you. It's usually best to always allow the OpenCart system handle installation related things for you since it helps save time and effort.
Once you get the success message, click the
X button to close the modal window.
If you are shown an error message, it means you will have to do it manually by switching from
Automatically Move to
Manual Move. You will see a message telling you how to go about it, but I have pasted the steps below so you can follow them here.
(Lazy Tip: This may not be necessary at this point if you are on your own computer, but if you need to upload your site to a server, then it's best you just carry out this step right now to save you the headache.)
[your_webroot] = the path to your server root folder. eg:
[above_webroot] = the path just outside your server root folder. eg:
6.1. In your folder or FTP program, move
6.2. Then go to your
opencart_3folder and open
config.phpin your favorite text editor, or notepad will do, then change the following line from
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');to
6.3. Open the
adminfolder and find the
config.phpfile. Open the file in your favorite editor like above and change
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');to
6.4. Go back to your OpenCart Admin panel and refresh the page. You should not see the popup window any longer. If you do, then you might have made a mistake somewhere or you need to clear your OpenCart cache and browser cache. To clear your browser cache, on your keyboard, press
CTRL + SHIFT + Rand this should clear the browser cache.The steps for clearing the OpenCart cache are a bit longer so you can find the quick tutorial in the following link: [Link to: how to clear your OpenCart cache.]
If you would like to change your OpenCart store theme you can check out our list of beautiful OpenCart frontend themes.
Key Settings You Should Adjust
This list covers the settings that you will want to set or change on your store before you launch your OpenCart Store. It's doesn't cover all settings, but just the general settings that most people will need, so if you have any questions about the other settings just leave a comment and I'll be sure to update the list with those settings too.
Let's start with...
1. Delete the "Demo" user group from your store.
If you want to use your site as a production site, you do not need the demo user group. You Can just create a new user group and assign the necessary permissions to that user group. Or you could rename the "Demo" user group and change the permissions as needed.
System > Users > User Groups. In the new page, select the checkbox beside the
Demonstration User group name. Then click the delete icon at the top right of the page.
All other settings starting below this point are changed within the
System > Settings page. Click on the
Edit icon on "Your Store" (You can change "Your Store" text below).
2. Meta Data
If you want to do well on search engines, then you have to handle the basics first. Even though the settings page does not star them as "required" fields, it is extremely important that you do.
This is the way you want your store name to show up in search engines. Just use your Store Name and you're set.
Meta Tag Description
Enter the Meta Tag Description that you want to be displayed on Google and other search engines when your store comes up in the search results.
Meta Tag Keywords
"Meta Tag Keywords" are no longer used by Google so you can ignore them or fill them in if you wish. It won't hurt.
3. Store Name
This is the name of your store and is obviously one of the most important things you need to setup.
4. Store Owner
I've always used the name of my company name (or store name) when filling this field out. It's used when OpenCart sends out order updates and fills out invoices, so use what you feel is necessary.
5. Business Details - Address, Email, Telephone, Opening Times
Whether you are running a downloads only store, like Base5Builder, or you sell physical goods, it's always a good idea to update your business details as it helps potential customers know more about your business and gives a little more credibility to your store.
Enter the following:
- Address: This is your store address
- Email: The email that you want OpenCart to use to send out emails
- Telephone: Your contact number. You may not display this on your website if you do not offer customer service by phone, but you should have it becuase it will be stated on your orders.
- Telephone: Your contact number
6. Image (Logo)
This is your store logo that will be used when displaying your store details. It doesn't say "Logo" but you should upload one. There is another setting where you will have to upload your logo again.
Click on the default OpenCart logo that you see. Then click on the Edit icon. You can upload your logo by using the "Upload" icon, then navigate through your computer to select your logo. It's best to have it as PNG instead of JPG so it will have a transparent background and will work on any type of page.
When it's uploaded, you have to find and select if from the image list that you see. You will now see your image selected.
(Pro Tip: The image is not saved if you do not click the Save button at the top right of the page.)
7. Opening Times
If you have open times, you can state that here. It's different for everyone, but for me, since I run download store that is open to the entire world, I do not state Open Times. You should consider using this option if your customers are local.
8. Location - Country, State
THis is quite straight forward, you will need to select which country and state/province that your business is in. As far as I know, it has every state available so you should have issues finding your location.
9. Language & Administration Language
You will need to select which language you want your website to be in. If you followed this tutorial from the beginning, then your site is in English. If you want to have your default site language in another language, then you will need to install another languge. Follow this tutorial on [LINK]How to install another language in OpenCart[/LINK].
Here, you will select the default currency of your OpenCart installation. There are 3 currencies installed by default, US Dollars, Euros and Pounds, so if you are using one of these currecies you just need to select it here. If you need a different currency, then you can [LINK]learn how to add a new currency[/LINK].
11. Auto Update Currency
If you have multiple currencies, you can allow OpenCart automatically do a currency conversion for you based on the exchange rate on xe.com. You may want to change it manually if the rate on xe.com doesn't match the actual conversions currently used in your country.
12. Length and Weight Classes
If you sell physical goods, then these options are important because you will need to inform you customers of the sizes and measurements of the goods. You don't want to set Kilograms for a US focused store.
- Length Class: This uses Centimeters as default and has 2 other options available. Millimeter and Inch
- Weight Class: This uses Centimeters as default and has 2 other options available. Millimeter and Inch
Customer reviews are a grea way to get others to make a purchase. So I think it would be a smart thing for you to enable reviews on your OpenCart installation. You can disable them, since they are enabled by default. You can also decide whether to allow guests post reviews or not.
- Allow Reviews: This will enable or disable the review section of your store front
- Allow Guest Reviews: If enabled, this means you will allow anyone to write a review, even if they are not signed in.
14. Customers Online
This feature is straigh forward. It lets you know how many people are current on your site and it displays this information on your admin dashboard. Enable it by selecting "Yes".
15. Customers Activity
There is a widget on your dashboard that shows the main actions that customers are carrying out on your store. You'll want to have this feature enabled since it will give you an idea of what's going on.
If you use the admin theme, Energize, you will need to enable this feature too.
16. Log Customer Searches
You definitely want this option checked. Why? Because it helps you know what customers want from your OpenCart store. For example, if you sell bicycles, and you see customers search for "childrens bicycles with training wheels". This should tell you what they want and what you should stock.
17. Account Term
Privacy terms and conditions of that you need to have in place for your store for legal reasons. You can edit this text in the information section.
18. Invoice Prefix
This prefix is used to generate your invoice numbers. I recommend that you change the number to suit your business. Remember to always end it with a set of numbers beacuse OpenCart will add 1 for each invoice generated. Eg: B5B-INV-00
This number is different from your order ID, which are auto-generated.
19. Display Weight on Cart Page
If you sell physical items that need shipping, then you might want to show your customers the total weight of their order when they are on their shopping cart. This will help them decide whether the cost of shipping for thier order is worth it. I recommend that you leave this enabled.
If your OpenCart installation is will not have physical items, but only downloadable products, then disable this feature by selecting "No".
20. Guest Checkout
This allows people to place orders on your store without the need of creating an account. There are varying types of advice on whether you should allow guest checkout and when in the buying process you should ask for your customers' details. So you will need to figure out what is best for you.
For me, since I run a downlaods store, this is disabled automatically by OpenCart.
21. Checkout Term
These are the terms and conditions that the customer needs to accept during checkout. Just leave this as it is. You will be able edit this text in the information section just like the "Account Terms" above.
22. Order Status
After a customer places an order on your store, this is the status that the order will be set to while you process the payment, address etc. It is not advisable to immidiately mark orders as "Complete" due to potential fraud issues and also the fact that it may confuse the buyer.
Having your order as "Pending" let's them know you are waiting for their order to be processed.
(Pro Tip: Depending on the payment provider you are using, you may have to use a different term here to match their own order statuses.)
23. Processing Order Status
As the tooltip says: "Set the order status the customer's order must reach before the order starts stock subtraction and coupon, voucher and rewards redemption."
That should be self explanatory, but from experience, the title is misleading because it confuses some store owners (me included). I think this should have a different name like, "Valid Orders" or something that conveys it's true purpose. If you notice in the list of checked statuses, "Complete, Pending, Processing, Reverse and Shipped" are all checked. Some people who I offer support to ask, 'why are my orders showing up under 'Processing' report when they are completed'. This option is why I get those questions.
24. Complete Order Status
As the tooltip says "Set the order status the customer's order must reach before they are allowed to access their downloadable products and gift vouchers." What this means is that your customers orders must be marked as at least one of the options that you check here before they can access downloadable content or other benefits of your store.
25. Fraud Order Status
If you use OpenCart's fraud check, then this will be important to you. Select the order status that you want the fraudulent order to be set to after it has been detected as fraud. Make sure it is not set to any of the orders that you set in 17 or 18 above.
26. Stock Settings
These options won't be necessary for a downloads-only store but you will certainly need them for a physical goods store.
- Display Stock: Do you want to show people how many items you have in stock? You may want to enable this feature is you think it will instill confidence in your potential customers minds about the seriousness of your business.
- Show Out Of Stock Warning: This will display the standard "Out of Stock" message when you are out of stock
- Stock Checkout: This feature will allow customers add the product to their cart even though you are out of stock. In my opinion, you should only use this feature if you know that your stock gets replenished really fast and won't really add much of a delay to the customer receiving their product. If you cannot guarantee this, then my advice is to leave it set to "No".
27. Affiliates Settings
Affiliates are a nice addition to any marketing strategy, but only if you have a healthy commision for affiliates. If you think you are up for it, then your OpenCart installation needs affiliates.
- Affiliate Group: You can segment your affiliates into a seperate group from your customer if you'd like. Here's a tutorial on how to do that: [LINK]Create Affiliates[/LINK]
- Affiliate Requires Approval: Do you want to personally approve affilaites? Then select "Yes". Do you want them to get approved instantly once they sign up? Then leave it as "No"
- Automatic Commission: This allows OpenCart automatically calculate the affiliates commissions when an order is completed. Select "Yes" to allow the system handle this, select "No" to do it manually. I recommend you select "Yes" so you have less to manage in the system.
- Affiliate Commission Percentage: What percentage of your order value do you want to give your affilaites? If the percentage is too small, then affiliate won't even bother promoting your products. If it's too large, then you may attract affiliates but it eats into your profits. So find a balance and set that number here.
No need to enter the "%" sign.
- Affiliate Terms: These are the terms and conditions that your affiliates must follow in order to remain affiliates of your store. You can leave this as it is for now and edit the text in the information section. ([LINK]Learn how to edit Information pages[/LINK])
If you have a return policy (you should), then you should use these settings. Even if you do not offer returns, then use the Returns Policy page to tell people and explain why.
- Return Terms: Select your return terms that will be shown to the customer. You can create your return policy in the information section ([LINK]Learn how to edit Information pages[/LINK])
- Return Order Status: When a customer returns an item, OpenCart will automatically set it to this status. Leaving it as "Awaiting Products" is good enough.
29. Store Logo
This is your store logo that will be visible on every page of your store. This will be used on both your store front and order emails.
Just like before, click on the default OpenCart logo that you see. Then click on the Edit icon. You can upload your logo by using the "Upload" icon, then navigate through your computer to select your logo. It's best to have it as PNG instead of JPG so it will have a transparent background and will work on any type of page.
This is the icon that will be visible on each browser tab when your customers visit your site. It helps them identify your site when they have other browser tabs open.
Select it the same way you selected your image above. The size should be 16x16 pixels. It's okay to be larger (it will auto resize) but you will have to make sur eboth width and height are equal. Eg: 48x48 pixels.
31. Mail & Mail Alert
If you are installing OpenCart 3 on your server, then odds are your mailing system already works. But if you are isntalling it on your localhost then the emails most likely doesn't work. I don't recommend you stressing yourself about the emails on localhost just yet, since you have to move the site to your server later.
I have created a seperate tutorial on getting your mail working if you are having issues. Here's the tutorial:
32. Maintenance Mode
Use this setting on your live site when you are about to upload new changes, so that you do not interrupt you customers experience on your store. You might want to have a notice on your store letting them know when scheduled maintenance will occur. I recommend making the changes during off-peak hours of your store.
33. SEO URLs, SSL
To prevent this post from being eternally long, I will create a separate tutorial on how to handle SEO in OpenCart 3. I'll update this post once their posted.
To prevent this post from being eternally long, I have created their own tutorials which you can follow.
- SEO URLs: [LINK]The right way to Setup OpenCart 3 SEO[/LINK]
- SSL: [LINK]OpenCart 3 SSL Setup[/LINK]
34. PHP Errors
Display Errors: If you are a developer, then you will already know what this is. But if you are not... you know sometimes you are on a website and you see some incomprehensible code at the top of the screen saying something like; "Warning: Illegal string offset..."? This section will prevent that from showing on your website.
If you are on your live site, the select "No". But on your localhost, you want to set this as "Yes" so that you know what errors are happening when and after you install OpenCart 3.
Log Errors: You want to leave this as "Yes" whether you are on your live site or localhost. This will log all the errors in a file located in
- Error Log Filename: You can just leave this alone as "error.log" since it is used in the setting above.
So there you have it! These are all the settings you need to know about to correctly install and setup OpenCart 3. With this done, you are less likely to have to go back and forth changing settings and breaking things.
You may have noticed that I skipped some settings. This is becuase they are best left as default.
If I have missed anything in this post or have stated anything incorrectly, please let me know in the comment section below. Also, if you know anyone that wants to start their own eCommerce website, you can share this post with them so they also start on the right footing.
The next step is to get the right theme for the frontend of your OpenCart store. Here's a list of themes I think are awesome.