NEWUse coupon code SMX20 to get 20% OFF your first billing cycle on any game server or VPS!Explore Store

SECURITY & DDOS

VPS Hosting for OpenCart Websites

How to host an OpenCart store on a VPS: requirements, sizing, Nginx or Apache with PHP-FPM and MariaDB, SEO URLs, caching, moving the storage directory, admin security, extensions, Indian payment gateways, backups and upgrades.

OpenCart is popular with small businesses and agencies because it is free, quick to install, and covers the essentials of an online store out of the box: products, categories, options, customers, orders, coupons and multi-store support. It is far lighter than Magento, so it does not need a large server, but moving from cheap shared hosting to a VPS still brings faster pages, consistent checkout performance and full control of security. This guide covers setting up OpenCart well on a VPS.

Requirements

  • A PHP version supported by your OpenCart release (OpenCart 4 requires a modern PHP 8 version; older 3.x releases support older PHP).
  • PHP extensions including curl, gd, zip, mbstring and mysqli.
  • MariaDB or MySQL.
  • Nginx or Apache with HTTPS.

Check that all your extensions and themes support the OpenCart and PHP versions you plan to use; extension compatibility is often the deciding factor.

Sizing

Store profileSuggested resources
Small store, hundreds of products2 vCores / 4 GB
Medium store, thousands of products, steady orders2–4 vCores / 8 GB
Large catalogue or multi-store with heavy traffic4 vCores / 16 GB

Installation Outline

  1. Provision a VPS, update packages, enable a firewall and set up SSH keys.
  2. Install Nginx or Apache, PHP-FPM with required extensions and MariaDB.
  3. Create a database and user with a strong password.
  4. Upload OpenCart, rename the config files as instructed and run the web installer.
  5. Delete the install directory after installation.
  6. Move the storage directory outside the public web root when the admin dashboard prompts you.
  7. Obtain a Let's Encrypt certificate and force HTTPS.

Nginx and SEO URLs

OpenCart's SEO-friendly URLs rely on rewrite rules. Apache uses the bundled .htaccess file (rename .htaccess.txt); on Nginx, add equivalent rewrite rules that pass requests for non-existent files to index.php with the route parameter. Deny direct web access to sensitive directories such as system and the storage directory if it remains inside the web root, and to files like .tpl, .twig, .ini and .log. Then enable SEO URLs in the store settings and set keywords for products and categories.

Performance

  • Enable PHP OPcache.
  • Use OpenCart's cache settings; Redis or Memcached can be used as cache engines where your version supports them.
  • Compress and resize product images; OpenCart generates cached resized images, so keep originals reasonable.
  • Enable gzip or Brotli compression and browser caching for static assets.
  • Use a CDN for images, scripts and stylesheets.
  • Tune MariaDB's buffer pool to hold the store database.
  • Remove unused extensions, modifications and themes.

Extensions and Modifications

OpenCart's marketplace offers thousands of extensions, and quality varies widely. Install only what you need from reputable developers, keep a list of every extension and its version, test on a staging copy first, and refresh modifications after installing or removing OCMOD extensions. Poorly written extensions are the most common cause of slow OpenCart stores and security problems.

Security

  • Rename the admin directory and update the config files accordingly.
  • Restrict the admin by IP or HTTP authentication, and use strong passwords for all staff.
  • Keep OpenCart, extensions and themes updated with security fixes.
  • Set file permissions so only the necessary directories are writable.
  • Remove the install directory and protect configuration files.
  • Use a web application firewall or CDN with bot protection.

Payments for Indian Customers

Use payment gateway extensions that support UPI, cards and net banking, preferably official extensions from the gateway. Check compatibility with your OpenCart version, configure webhooks or callbacks over HTTPS, and test success, failure and refund flows in sandbox mode. Configure tax classes for GST with advice from your accountant.

Backups

Back up the database at least daily (more often for busy stores), plus the image directory, storage directory and configuration files, encrypted and off-server. Before every upgrade or extension installation, take a full backup or snapshot. Test restores on a staging VPS.

Upgrading OpenCart

Major OpenCart upgrades (such as from 3.x to 4.x) change themes and extensions significantly and are closer to migrations than updates. Plan them on a staging copy: check that every extension and theme has a compatible version, migrate data, test the full order flow, then switch over during a quiet period. Minor updates still deserve a backup and a staging test.

Multi-Store Setups

OpenCart can run several storefronts from one admin, each with its own domain, theme and settings. On a VPS, point each domain to the same installation, add each to the Nginx server names with its own certificate, and configure stores in the admin. Size the server for the combined traffic of all stores.

Monitoring

Monitor CPU, memory, disk space and PHP-FPM workers, and set up external uptime checks for the storefront and checkout. Review OpenCart's error log and the web server error log regularly; extension errors often appear there before customers report problems.

Example: A Spice Exporter's Store

A spice business selling across India and abroad runs OpenCart 4 on a 2 vCore / 8 GB VPS in Noida with Nginx, PHP-FPM and MariaDB. SEO URLs are enabled, the storage directory sits outside the web root, the admin is renamed and IP-restricted, and images are served through a CDN. A UPI-capable gateway handles domestic payments and an international gateway handles foreign cards. Daily backups go to object storage, and upgrades are tested on a staging copy first.

Common Mistakes

  • Leaving the install directory in place.
  • Keeping the storage directory inside the public web root.
  • Installing many unvetted extensions.
  • Using the default admin path with no restrictions.
  • Uploading huge original product images.
  • Upgrading major versions directly on production.

In Short

OpenCart runs well on a modest VPS. Use supported PHP and MariaDB versions, configure SEO URLs, move the storage directory, protect the admin, enable OPcache and caching, vet extensions, connect Indian payment gateways, back up off-server and test upgrades on staging.

ServoMix Plans for This Workload

OpenCart is lightweight: 2 vCores / 4–8 GB runs most stores comfortably; larger catalogues and busy stores benefit from 4 vCores / 16 GB.

AMD EPYC 7C13 VPS

Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
SMX vPro XS (AMD EPYC)28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹420/moWebsites, small APIs, bots, staging and VPN serversOrder
SMX vPro S (AMD EPYC)416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹560/moWooCommerce, Node.js/Python backends, Docker Compose stacks, CI runnersOrder
SMX vPro M (AMD EPYC)832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹840/moProduction databases, high-traffic sites, multi-container appsOrder
SMX vPro L (AMD EPYC)1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹1,120/moLarge production workloads, SaaS platforms, analytics, in-memory cachesOrder

Intel Xeon Platinum 8269CY VPS

KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
SMX vCore XS (Intel Xeon)28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹270/moBusiness websites, small apps, scheduled jobs and botsOrder
SMX vCore S (Intel Xeon)416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,169/monthBusiness software, mid-size databases, several sites on one serverCheck stock
SMX vCore M (Intel Xeon)832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,249/monthERP/CRM stacks, heavier databases, multiple production appsCheck stock
SMX vCore L (Intel Xeon)1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,248/monthHigh-memory workloads and consolidated production serversCheck stock

Prices are monthly in INR as listed on the ServoMix store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.

Frequently Asked Questions

How much server does OpenCart need?
2 vCores / 4–8 GB for most stores; 4 vCores / 16 GB for large or busy stores.
Which PHP version does OpenCart need?
It depends on the release; OpenCart 4 requires a modern PHP 8 version.
Does OpenCart work with Nginx?
Yes, with rewrite rules equivalent to the bundled .htaccess file.
Why move the storage directory?
Keeping it outside the web root prevents direct access to logs, cache and uploads.
How do I secure the OpenCart admin?
Rename it, restrict it by IP or HTTP authentication and use strong passwords.
How can I speed up OpenCart?
Enable OPcache, caching, image optimisation, compression and a CDN, and remove unused extensions.
Can OpenCart accept UPI payments?
Yes, through Indian payment gateway extensions.
How often should I back up OpenCart?
The database at least daily, plus images and configuration, stored off-server.
How do I upgrade from OpenCart 3 to 4?
Treat it as a migration: test extensions, themes and data on a staging copy first.
Can OpenCart run multiple stores?
Yes, multiple storefronts can share one installation and admin.

Frequently Asked Questions

How much server does OpenCart need?

2 vCores / 4–8 GB for most stores; 4 vCores / 16 GB for large or busy stores.

Which PHP version does OpenCart need?

It depends on the release; OpenCart 4 requires a modern PHP 8 version.

Does OpenCart work with Nginx?

Yes, with rewrite rules equivalent to the bundled .htaccess file.

Why move the storage directory?

Keeping it outside the web root prevents direct access to logs, cache and uploads.

How do I secure the OpenCart admin?

Rename it, restrict it by IP or HTTP authentication and use strong passwords.

How can I speed up OpenCart?

Enable OPcache, caching, image optimisation, compression and a CDN, and remove unused extensions.

Can OpenCart accept UPI payments?

Yes, through Indian payment gateway extensions.

How often should I back up OpenCart?

The database at least daily, plus images and configuration, stored off-server.

How do I upgrade from OpenCart 3 to 4?

Treat it as a migration: test extensions, themes and data on a staging copy first.

Can OpenCart run multiple stores?

Yes, multiple storefronts can share one installation and admin.

Was this article helpful?

Your feedback helps us continuously improve ServoMix guides.

Share this article

Know someone who may find this guide useful?

VPS Hosting for OpenCart Stores: Setup, Speed and Security | ServoMix