Installing OpenCart on hosting takes 15–30 minutes: you need to upload the files, create a MySQL database, and complete the web installer. The key is to choose a PHP versionThe language version on the hosting. 3.0.4.1 requires at least PHP 7.3, while 3.0.5.1 and 4.1.0.4 require at least PHP 8.1; check extension compatibility before updating. More in the glossary → compatible with the OpenCart branch you're using in advance, and after installation, remove the install folder and move the storage directory outside public access.
Examples are for OpenCart 4.1; in 4.0.x, model triggers and event handling differ.
What do you need before installing OpenCart?
First, determine the version. The current releases are OpenCart 3.0.5.x and 4.1.0.x. Version 3.0An older branch with a large number of ready-made modules; many stores still run on it. More in the glossary → has the most ready-made modules and themes, while 4.1 has a newer architecture, but some extensions are not yet adapted. For more on choosing, read the article about the platform's strengths and weaknesses: Why OpenCart: Strengths and Weaknesses.
Next, check your hosting. Approximate requirements:
| Parameter | OpenCart 3.0 | OpenCart 4.1 |
|---|---|---|
| PHP | 3.0.5.1 — PHP 8.1 or newer; 3.0.4.1 — PHP 7.3 or newer (including 7.4) | 8.1 or newer for 4.1.0.x |
| Database | MySQL 5.7+ or MariaDB | MySQL 5.7+ or MariaDB |
| PHP extensions | curl, gd, mbstring, zip, zlib, mysqli, openssl | curl, gd, mbstring, zip, zlib, mysqli, openssl |
| Web server | Apache with mod_rewrite or Nginx | Apache with mod_rewrite or Nginx |
See the README file and the release page for exact requirements, as they change between minor versions. Also prepare: a domain pointed to your hosting, an SSL certificate (free Let's Encrypt on most hosts), and access to the control panel (cPanel, ISPmanager, DirectAdmin) or via FTP/SSH.
Where to get the distribution and how to upload files to hosting?
Download the archive only from official sources: the opencart.com website or the official repository on GitHub. Builds from third-party sites often contain hidden backdoors — this is the most common way to hack a store before it even launches.
OpenCart 3.0: what's inside the archive
Unpack the archive on your computer. You need the upload folder: its contents are copied to the site's root directory (usually public_html or www/домен). In both branches (3.0 and 4.1), before running the installer, rename config-dist.php to config.php and admin/ to admin/config.php and give them write permissions.
OpenCart 4.1: what's inside the archive
The structure is similar: the contents of upload go to the site root, and before running the installer, likewise rename config-dist.php to config.php and admin/ to admin/config.php. In both branches (3.0 and 4.1), the system/storage directory should be moved outside public_html, and the .htaccess.txt file should be renamed to .htaccess for SEO-friendly URLsReadable addresses such as /kurtky/zymova instead of index.php?route=. They are enabled in the settings on the "Server" tab and through .htaccess. More in the glossary →.
It's most likely faster to upload the archive as a single file via the hosting file manager and extract it on the server than to transfer thousands of small files over FTP. If you have SSH:
cd ~/www/example.com
unzip opencart-4.1.0.4.zip -d /tmp/oc
cp -r /tmp/oc/upload/* .
cp /tmp/oc/upload/.htaccess.txt .htaccess
mv config-dist.php config.php
mv admin/config-dist.php admin/config.php
For a detailed explanation of the directories' purposes, see the article file structure of OpenCart 3.0 and 4.1.
How do you create a database for OpenCart?
In your hosting control panel, open the "MySQL Databases" section and create:
- a new database with
utf8mb4encoding (collationutf8mb4_general_ci); - a separate user with a strong password (do not use your hosting account for this);
- privileges for the user on this database — "All".
Write down four values: the host (most often localhost), the database name, the username, and the password. On some hosts, your account prefix is automatically added to the database name, for example user_shop — you must enter the full name with the prefix in the installer.
If you create the database via the console, the commands look like this:
CREATE DATABASE shop CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'shop_user'@'localhost' IDENTIFIED BY 'СкладнийПароль';
GRANT ALL PRIVILEGES ON shop.* TO 'shop_user'@'localhost';
Leave the table prefixThe beginning of table names, by default oc_. More in the glossary → (the "Prefix" field in the installer) as oc_ if the database contains only one store. Change it only when several sites share one database.
How do you go through the OpenCart web installer?
Open the address https:// in your browser. For 4.1, the address is the same — /install.
- License. Accept the terms and click "Continue".
- Requirements check. The installer shows the PHP version, extensions, and write permissions. Red items must be fixed before proceeding.
- Database details. Enter the host, user, password, and database name. In both branches (3.0 and 4.1), the installer offers a choice of DB driver — leave it as
MySQLi. The port is usually 3306. - Administrator. Specify a login, password, and email. Do not leave the login as
admin— it is tried first by attackers. The password should be at least 12 characters long. - Completion. A message about successful installation will appear with buttons to go to the store and the admin panel.
Common errors at the requirements stage
- config.php is not writable. Set the permissions of the
config.phpandadmin/config.phpfiles to 644 or temporarily 666, and set the owner to the hosting user. Create empty files manually if they are missing. - A required extension is missing. Enable it in the "PHP Version Selection" section of your hosting control panel.
- White screen. Turn on error display during setup or check the PHP error log on your hosting.
For how the file configs are generated, see the article config.php in OpenCart.
What must you do right after installation?
1. Move the storage directory
The storage folder contains cache, logs, uploads, and backups. In OpenCart 3.0 and 4.1, it should be moved one level up from the public directory (outside public_html). After moving it, change the path in the DIR_STORAGE constant in both config.php files:
define('DIR_STORAGE', '/home/user/storage/');
For 4.1, the admin panel also has a hint about this on the dashboard; clicking it can perform the move almost automatically.
2. Enable SEO-friendly URLs
Rename .htaccess.txt to .htaccess. Then, in System → Settings, on the Server tab, enable "Use SEO URLs". For Nginx, the rules are added manually to the virtual host config.

3. Protect the admin panel
- Rename the
adminfolder (for example, tomanage-x7) and update the pathsHTTP_SERVER,DIR_APPLICATION, etc. inadmin/config.php. - Restrict admin access by IP via
.htaccessif you have a static address. - Disable error display on the site: "Display Errors" — "No", "Log Errors" — "Yes".
4. Set up backups
Enable automatic backups of the database and files on the hosting side. The built-in System → Maintenance → Backup / Restore section (Maintenance → Backup / Restore) is suitable for small databases, but for large directories it is more reliable to make a dump via cron or the hosting control panel.
What else should you set up to get the store running?
A clean installation is an empty demo store. To accept your first order, go through the minimum set:
- Basic store details, currency, language, email — described in detail in the article on initial setup.
- Localization: in 3.0, the language is added as a separate package. If you don't want to assemble the package manually, there is a ready-made OpenCart 3 bundle in Ukrainian.
- Email: set up SMTP so order emails don't end up in spam — see email setup in OpenCart.
- Card payments — payment modules for Ukraine; Nova PoshtaThe most popular carrier in Ukraine. The integration usually pulls cities and branches through an API. More in the glossary → and Ukrposhta delivery are connected via separate extensions.
- Legal pages (offer, delivery and payment, returns) — in Catalog → Information.
For the general launch order, see the article how to launch an online store without rework. You can clarify new terms in the e-commerce and OpenCart glossary.
If errors appear after installation that you can't explain, check System → Maintenance → Error Logs (Maintenance → Error Logs).

Should you install OpenCart manually or through the hosting auto-installer?
Many hosts offer "one-click installation" (Softaculous and similar). It's fast, but there are nuances: an outdated version is often installed there, and the file structure may differ from the official one. Manual installation gives you control over the version, permissions, and storage location.
A practical rule: an auto-installer is fine for a test site, but for a live store it's better to install manually from the official archive. This way you know for sure that there are no foreign changes in the code and understand where everything is when you need to update or fix the site. If problems arise that you don't want to solve yourself, you can order further development and bug fixing.
Other materials in this section are collected on the page "OpenCart: Installation and Administration".
Summary
- Choose a version (3.0 or 4.1) based on your modules and tasks, and check PHP compatibility on your hosting.
- Download the distribution only from official sources; the contents of the
uploadfolder go to the site root. - Database — utf8mb4, a separate user, strong passwords, a non-standard administrator login.
- After the installer: delete
install, movestorage, enable SEO URLs, hide the admin panel, set up backups. - Next — localization, email, payments, delivery, and legal pages.
The next step is the initial store setup: currency, language, images, and checkout.