When installing OpenCart, server problems may not show up right away. The store seems to install fine, but later you get errors, slow page loading, or issues with individual modules.
I have installed OpenCart on different servers, from ordinary shared hosting to VPS. That’s why, before installation, I recommend first checking the PHP version, the database, the available memory, and the required extensions.
Below I’ll go through the main requirements and the options for installing OpenCart for development and for a production store.
OpenCart requirements
OpenCart doesn’t require an especially powerful server, but there are a few parameters worth paying attention to.
| Component | Requirement |
|---|---|
| Web server | Apache with mod_rewrite or Nginx |
| PHP | 7.4–8.3 for OpenCart 3.x, 8.0+ for OpenCart 4.x |
| Database | MySQL 5.7+ or MariaDB 10.3+ |
| Database driver | MySQLi |
| PHP extensions | curl, gd, mbstring, zip, xml, openssl, zlib, iconv |
| memory_limit | preferably 128–256 MB or more |
| file_uploads | On |
| max_execution_time | 30 seconds or more |
| Additionally | OPcache and an SSL certificate |
The exact requirements depend on the OpenCart version and the installed extensions. Before installing, check the documentation for the specific version you plan to use.
The OpenCart installer itself also checks the server environment. If an extension or setting is missing, it will show a warning.
Hosting for OpenCart
A small store usually doesn’t need a dedicated server. You can start with ordinary shared hosting if it offers the required PHP versions, a database, and reasonable resource limits.
When choosing hosting for OpenCart, I first check:
- PHP — you should be able to choose the required PHP version from the control panel.
- Disk — SSD or NVMe is better, especially if the store has many products and images.
- RAM and CPU limits — a basic plan is usually enough for a small store, but with many modules the requirements will be higher.
- SSL — ideally, Let’s Encrypt should be connected without manual setup.
- Control panel — cPanel, ISPmanager, FastPanel, or another familiar panel.
- Backups — automatic backups of files and the database are desirable.
- PHP limits — it’s important to check memory_limit, max_execution_time, upload file size, and other limits.
- SSH access — especially useful if the store runs on a VPS.
If the catalog is large, traffic is high, or the site has many heavy modules, it makes sense to look at a VPS. On your own server it’s easier to control PHP, the web server, caching, and other settings.
At the same time, buying a VPS just because it’s “faster” isn’t necessary. For a small store, good shared hosting often covers all the needs.
OpenCart PHP 7.4-8.3
It’s best to check the PHP version even before buying hosting. If the provider lets you change PHP through the control panel, this greatly simplifies installation and further maintenance of the store.
OpenCart 3.x uses PHP 7.4–8.3, while OpenCart 4.x requires PHP 8.0 or higher. The specific PHP version must match not only OpenCart but also the installed modules.
I wouldn’t choose a server simply on the principle of “the newer the PHP, the better.” First make sure that the modules and modifiers you use are compatible with that version.
If the store is already running, it’s advisable to make a backup before changing PHP and to test the site on a copy or a test server. This is especially important for older stores with many third-party modules.
OpenCart database
The OpenCart database deserves separate attention. The store uses MySQL or MariaDB, and the connection is made through MySQLi.
When moving a site to another server, you need to transfer not only the OpenCart files but also the database. After that, check the connection details in the configuration files and the database user’s privileges.
If the database works properly and PHP and the required extensions are configured correctly, OpenCart itself doesn’t require any complicated DBMS configuration for an ordinary store.
Installing OpenCart on XAMPP, OpenServer and Ubuntu
For development and testing, I often use a local server. It lets you install OpenCart on your computer, test a module or a template change, and only then move everything to the production site.
Installing OpenCart on XAMPP
To install OpenCart on XAMPP, I first install XAMPP itself and start Apache and MySQL.
I extract the OpenCart archive into the folder:
C:\xampp\htdocs\opencart
After that, I create a separate database via phpMyAdmin.
Then I open in the browser:
http://localhost/opencart
and go through the standard OpenCart installation wizard.
For local development this option is convenient because the whole site is on your computer and you don’t need separate hosting for testing.
Installing OpenCart on OpenServer
With OpenServer, the process is roughly the same.
I create a separate domain in OpenServer, put the OpenCart files there, and create a database using the available database management tool.
After that, I open the created local domain and run the OpenCart installer.
This option is convenient if you work on several projects at once: for each store you can create a separate local domain and database.
Installing OpenCart on Ubuntu
If the store is installed on an Ubuntu VPS, the process requires a bit more manual setup.
First I install the web server, Apache or Nginx, then the required PHP version and MySQL or MariaDB.
After that:
- I create a database and a user;
- upload the OpenCart files to the server;
- configure the virtual host;
- check the permissions on files and folders;
- connect the domain;
- install an SSL certificate;
- run the OpenCart installer.
The store files are usually placed in a directory like:
/var/www/opencart
File permissions depend on the server configuration. For example, for Apache with the www-data user you can use:
chown -R www-data:www-data /var/www/opencart
After installation, I always delete the /install folder. I also check the permissions on config.php and admin/config.php so that they don’t remain writable without need.
What else to check after installing OpenCart
After installing the store, I recommend not limiting yourself to checking only the home page.
It’s worth checking:
- the catalog and product pages;
- the cart and checkout;
- admin login;
- image uploads;
- SEO-friendly URLs and
mod_rewrite; - the installed modules;
- email sending;
- HTTPS;
- file permissions;
- backups.
For a production store it also makes sense to enable OPcache and set up caching wherever it is supported by the OpenCart version you use and the installed modules.
If the store starts to slow down noticeably, the problem isn’t always the hosting. The cause may be a heavy module, an unoptimized database query, a large number of products, images, or the OpenCart settings themselves.
Summary
A small OpenCart store usually doesn’t need an expensive server. The main thing is to pick hosting with a suitable PHP version, reasonable resource limits, SSD/NVMe, backups, and the ability to configure the necessary parameters.
For development you can use XAMPP or OpenServer. If you need a full server with more control over the settings, an Ubuntu VPS is a good fit.
And before moving a production store, it’s better to check the compatibility of PHP, modules, and the database in advance. This helps avoid the situation where, after the move, you have to hunt for the cause of errors one by one on a live site.