RU Русская версия

Moving an OpenCart store to new hosting: step-by-step guide

Steps for OpenCart 2.x, 3.x, and 4.x: database, files, paths in config.php, modifications and cache, paid ionCube extensions, scheduled tasks, and common errors.

  • 10 stepsguide
  • 2.x–4.xOpenCart versions
  • 4 minread

Published by Sergey Polyakov

Was your site hit by the Beget outage?

Where to get a copy of your site, what is happening with domains and email, and what to do without a backup: see OpenCart or MODX site down after the Beget outage.

An OpenCart store can be moved to new hosting in a few hours if you have the files and the database. This guide covers OpenCart 2.x, 3.x, and 4.x.

What you need

  • An archive of the store files, including the storage folder if it was moved outside the site root.
  • A MySQL database dump: it holds products, orders, customers, and settings.
  • The PHP version the store ran on before. Older stores on OpenCart 2.x and early 3.0 often do not run on PHP 8 without changes.
  • Access to the new hosting: control panel, FTP or SSH, phpMyAdmin.
  • A list of paid extensions and access to the accounts where you bought them: some licenses will need to be reissued.

If you do not have a copy, start with Step 1. Get the site files and a database dump.

Step by step

  1. Create a database on the new hosting with the same character set as before (usually utf8mb4 or utf8). Write down the database name, user, password, and host.
  2. Import the dump in phpMyAdmin. If the file exceeds the upload limit, import it over SSH with mysql -u USER -p DBNAME < dump.sql.
  3. Upload the files to the site root (usually public_html or www). In OpenCart 3.x and 4.x, make sure the storage folder came along too: it is often moved outside the site root.
  4. Edit config.php in the site root. Replace:
    • the paths in the DIR_* constants, from old ones like /home/x/xxxx/site.ru/public_html/ to new ones. In 3.x these are DIR_APPLICATION, DIR_SYSTEM, DIR_IMAGE, DIR_STORAGE, and the paths derived from them. In 2.x the list is longer: DIR_LANGUAGE, DIR_TEMPLATE, DIR_CONFIG, DIR_CACHE, DIR_DOWNLOAD, DIR_LOGS, DIR_MODIFICATION, and DIR_UPLOAD are set separately. In 4.x, DIR_OPENCART and DIR_EXTENSION are added;
    • the database credentials: DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_PREFIX;
    • HTTP_SERVER and HTTPS_SERVER (only HTTP_SERVER in 4.x) if you test the store on a temporary domain first.
  5. Edit admin/config.php. It has the same constants as the root file plus three that are often forgotten: HTTP_CATALOG and HTTPS_CATALOG (the storefront URL) and DIR_CATALOG (the path to the catalog folder). With old values, the admin panel opens, but storefront links and the theme template list point to the old server.
  6. Clear the cache: the contents of system/storage/cache (or storage/cache if the folder was moved) and image/cache. Do not delete the folders, only the files inside. If the store uses vQmod, clear its cache too: the vqmod/vqcache folder and the mods.cache and checked.cache files in the vqmod folder.
  7. Refresh modifications: in the admin panel, Extensions → Modifications → Refresh. In 3.x and later, then clear the theme cache and SASS cache on the dashboard (the gear button). Without this, OCMOD extensions will not load.
  8. Check permissions: 755 for folders, 644 for files, write access to image/, storage/, and system/storage/.
  9. Recreate scheduled tasks. Cron jobs do not move with the files: 1C sync, marketplace feeds, newsletters, and exchange-rate updates need to be added again in the new host’s control panel.
  10. Walk through the store as a customer: catalog, filter, cart, checkout, order emails, payment, shipping, 1C sync.

Paid extensions protected with ionCube

Some paid OpenCart extensions ship as ionCube-encoded files. To run them, the server needs ionCube Loader in a version the extension supports, along with a matching PHP version. The licenses of such extensions are often tied to the domain or server. After a move the extension stops working, and the license has to be reissued by the author, if the author can still be reached.

There are two options:

  • Replace the extension with one of our free extensions if there is a suitable one: filter, search, checkout, shipping, 1C sync, reviews, and more. All of them are open source. See the list of our extensions.
  • Build a custom extension with open source code, no encoding, and no server lock. It moves with your store without reissuing licenses.

Common errors after the move

What you seeLikely cause
Blank page or a 500 errorWrong PHP version or old paths in config.php
Error: Could not make a database linkWrong database credentials or table prefix
The home page works, categories return 404.htaccess was not moved or mod_rewrite is off. nginx needs its own rules
No product imagesThe image/catalog folder was not moved or image/cache is not writable
Broken layout, extensions not workingModifications not refreshed, old cache left, including the vQmod cache
An extension stopped working after the moveIts license is tied to the old server or ionCube Loader is missing
Orders do not reach 1C, feeds do not updateScheduled tasks were not recreated
Storefront links in the admin panel go to the wrong place, the theme settings show no templatesOld HTTP_CATALOG, HTTPS_CATALOG, or DIR_CATALOG in admin/config.php

After the move

  • Change admin, database, FTP, and SSH passwords, and issue new keys for payment services and shipping carriers.
  • Send email through your domain’s SMTP server; see our guide to OpenCart email over SMTP.
  • Check crawl errors in Yandex Webmaster and submit key pages for recrawling.
  • Set up daily database backups stored with another provider and uptime monitoring. Both are part of our website support.
From our work

A cosmetics store on OpenCart went down on the night of November 2, 2026, because of the Beget outage. We kept a copy of the site, so on November 5 we set the store up with another hosting provider. The move took one business day, and on November 6 the store was taking orders again.

We build, improve, and move OpenCart stores: see OpenCart development and support. For MODX, see our separate guide to moving MODX.

More articles

Step-by-step guides: domain, hosting, email, maps, and MODX setup.

All articles

Let’s talk

Want us to move your OpenCart store? Send us the site address, and we will reply within one business day with a plan and a price.

  • Emailinfo@studiops.ru
  • Messaging app
  • OfficeBalashikha, Moscow Region, Russia
    Mon–Fri, 8 a.m.–5 p.m. Moscow time (UTC+3)
What can we help with?