How to move ZenCart to another server

I’ve moved so many Zen carts to many servers before, so this is my input to help out some developers out there trying to move a zencart over to another server environment.

Check for version compatibility:
Every Zencart has its version, check to make sure that the Zencart version is compatible with the PHPMySQL version where you want to move the cart to. Don’t proceed next step if the new server is not compatible to your old Zencart version. Try to download the latest or newest version of Zencart then install it to the new server.

Download files from old server down to your local PC:
Use FTP tool to download all Zencart files to your local PC. It depends on how large your shopping cart is and how many modules /plug-ins, large product photos, or customized codes in your shopping cart, it may take up between 30 mins to 3 hours to download all your file system. 1 of my customers asked me why it took 9 hours to download all his Zencart files. I looked at his files, I saw 3-4 TB of photos that he collected from year 1980s until today and each photo is 3-4MB, that’s why it took so much time. So be patient if you have many large photos with high pixels.

Upload files to your new server:
Use FTP tool again to upload all files to new server.

Export MySQL Database:
From your old server, export all Zencart tables (new version: 95 tables by default. You may have more tables if more modules/plug-ins have been built on your Zencart). You can use phpMyAdmin or SQLYog or any Commercial MySQL DB tool to export files.

Import MySQL Database to the new MySQL server:
Now all those steps done and your shopping cart is still displaying some serious errors such as Database not connected, host not recognized, wrong password,… and nothing works. Some of my customers asked me why. Now it’s time you’ll need an experience developers who are familiar with ZenCart to fix all these issues. If you’re a business owner and doesn’t know PHP-MySQL codes, DO NOT try to modify anything in the Zencart. Even if you miss a semi-colon, the entire website is down forever. Then you have to hire some ZenCart developer to trace all these bugs down in order to fix the right location.

If you move to another house, same thing happens. You have to move all your belongings also and try to re-organize your stuff in the new house, right?

Now, next steps which are the most important after all files and databases are moved over to new server.

Change Configuration parameters to adapt to the new server environment:
Open Zencart Cofiguration file and change all the required variables/parameters to the new values so that the Zencart can run properly on your new server.

Point your domain name to this ZenCart directory:
Login to Admin Control Panel of your new hosting account, point domain name to this Zencart folder after DNS resolved to new server (roughly 72 hours to have full functions on your domain name).

QA/Debugging after all steps are done:
Buy a PHP commercial debugger such as PHPEd. I have used this tool since the 1st version, it’s very powerful. Install the tool on your local PC, during the settings, point it to your new server, then debug from there. Go thru ZenCart purchase process to see where a bug exist, then fix it from there. If you’re a business owner, you can go thru this QA process by yourself. If you find any bug, hire some ZenCart developer to fix it. Do Not try to fix it by yourself if you don’t know PHP-MySQL or at least ZenCart’s logic. If you miss a quote, or a double quote, or a semi-colon, your entire shopping cart will stop working. Believe me, I’ve seen so many business owners being cheap and trying to fix ZenCart by themselves and broke the shopping cart on production server. When they hired me to fix their ZenCart, I found missing quotes, missing $ in front variables, missing tags, … You don’t want customers to view your website when the codes are broken everywhere, they’ll never come back again.

Important reminder:
To be safe, you MUST have a PHP Debugger, a testing server running on Linux/Unix or Window Apache, PHP-MySQL to test ZenCart purchase process before pushing any codes to production server.