Every business owner eventually hits this wall: your hosting company sends a renewal notice, the price jumped, or your site has gotten slower and slower until customers start complaining. You decide to move to a new server. Then the panic sets in. What if the site goes down? What if you lose orders? What if customers see a broken page?
Here's the truth: moving OpenCart to a new server is completely doable without losing a single sale — but only if you do it in the right order. Jump in blind and you risk downtime, lost orders, and a support nightmare. Follow the steps below and you can move your shop, your database, and all your settings while your store stays open for business the whole time.
Get Ready: The 30-Minute Prep That Saves Your Sales
Before touching anything, put your store in Maintenance Mode. This is not the same as closing your shop. Maintenance Mode shows a polite "be right back" page to visitors while you work on the backend. Your customers see a clean holding page instead of a scary error screen, and you can work without worrying about new orders landing mid-migration and getting lost in the shuffle.
In your OpenCart admin panel:
- Go to System > Settings
- Click the pencil icon (Edit) next to your store
- Open the Server tab
- Scroll down and set Maintenance Mode to Yes
- Click Save
Second, do a full backup. You need two things: your files and your database. Most hosting control panels (cPanel, Plesk) have a "Backup" section — use it to download a complete file backup. Then open phpMyAdmin, select your OpenCart database, and click Export. Save both files somewhere safe on your computer. If anything goes wrong on the new server, you can restore these and lose nothing.
How to Migrate OpenCart to a New Server (Step by Step)
This is the core of the operation. Here's the exact path that works for virtually every OpenCart store (versions 2.x and 3.x).
Step 1: Set up the new server. Log in to your new hosting control panel and create a new database and a database user. Give that user all privileges on the database. Write down the database name, username, and password — you'll need them in a minute.
Step 2: Upload your files. Use the File Manager in your new hosting panel (or an FTP tool like FileZilla if you prefer) to upload the file backup you downloaded earlier into the new server's public_html folder. This will take a while — that's fine, your old store is still running and selling.
Step 3: Import your database. Open phpMyAdmin on the new server and select the empty database you created. Click Import, choose the database file you exported earlier, and click Go. Wait for the green success message before moving on.
Step 4: Update the two config files. OpenCart uses two small files named config.php — one in the root of your store folder and one inside the admin folder. Open both with a simple text editor. You'll see lines that define the database settings. Replace the old database name, username, and password with the new ones from Step 1. Also look for lines that set the HTTP server address — until your domain points to the new server, you'll need to temporarily put the new server's temporary URL or IP address there so you can test.
Step 5: Update the store settings in the database. Open the database in phpMyAdmin, find the table called oc_setting (the prefix might be different if you customized it), and look for rows that contain your old domain name. There will be a few — config_url and config_ssl are the important ones. Change each of them to the new temporary URL for now.
Step 6: Clear the caches. Log in to your OpenCart admin on the new server and go to Extensions > Modifications, then click the refresh button (the blue circular arrow icon). Then click the gear icon in the top-right of your dashboard to clear the cache. This forces OpenCart to recognize all the changes you just made.
If you see any errors about a "storage" folder — this happens with newer OpenCart versions — check that the storage folder is outside your public_html folder and that the paths in config.php point to the right location.
Test Everything Before You Cut Over
Now the important part. With Maintenance Mode still on, walk through your new site using the temporary URL. Test the homepage, a product page, your cart, and the checkout flow. Make sure images load, prices show correctly, and customers can still log in to their accounts.
Here's a trick so you can see the full store while Maintenance Mode is still on: in System > Settings > Server tab, there's a field for Maintenance IP — add your own IP address there. You can look up "what is my IP" on Google to find yours. This lets you see the site exactly as a real customer would while everyone else still sees the maintenance page.
If something is broken, this is the moment to fix it. You've lost nothing yet, and customers never saw a thing. This testing phase is what separates a smooth migrate OpenCart to new server experience from a disaster.
The Final Switch: Changing Your Domain with Zero Downtime
When everything checks out, it's time to point your domain to the new server. Log in to your domain registrar (the company where you bought your domain) and change the DNS settings or nameservers to the ones your new host gave you. This is the only step that touches your live site — and it's a redirect, not an outage.
You're not done yet, though. DNS changes can take up to 48 hours to reach everyone on the internet. During that window, some visitors will still hit your old server. So keep the old server running — do not cancel it — and keep Maintenance Mode ON on the new server until you're sure the store is fully live. Most business owners do this cutover late at night when traffic is low.
Once your domain loads the new site (check from your phone with Wi-Fi off, and also from a friend's device), go back into the admin panel, turn Maintenance Mode off, and update the settings in the database from the temporary URL back to your real domain. Then clear the caches one last time.
Leave the old server running for at least a week. Once you're sure every visitor is on the new server, cancel the old hosting.
That's the entire process — and it's how you migrate OpenCart to a new server without a single minute of downtime or a single lost order. The trick is patience: do all the heavy lifting while the old site runs, test like your business depends on it (because it does), and only switch the domain when you're certain everything works.
If you followed the steps above and something's still broken — or you'd rather not risk doing it yourself — that's exactly when DevCev Digital can help. They'll handle the move for you, end to end, while you keep selling.