How to Transfer OpenCart from one server to another

In this tutorial we are going to learn about how to transfer the opencart site from one hosting server to another hosting server manually using FTP. During this process we are not going to update the site url, since we are transferring hosting account only not the domain name.

OpenCart is one of the most popular e-commerce platform preferred by large and small businesses for online shopping. We have already have an article on how to install OpenCart, now we are going to learn how to migrate OpenCart website from one server to another.

Step 1:

Backup OpenCart Files

One of the easiest ways to back up your opencart files is FTP, there are many FTP tools available like FileZilla, CoreFTP, Cyberduck or Others..

To download the files to the server, you need the following FTP credentials

  • FTP Host
  • Username
  • Password
  • Port(optional)

Using the FTP Credentials connect to the server and download the files.

Wait for a while till the download is complete in the mean while you can backup the database and be ready to transfer the server.

Step 2:

Backing up Database

Now we are going to get a copy of database, you can download the latest database using cpanel. Login to your cpanel then go to phpMyAdmin and Export the live database to the local system.


Now you have downloaded the files and database, you are ready to transfer the files to the new hosting account.

Step 3:

Upload OpenCart Files

Now you need to upload the opencart files to new hosting accounts, you can use FTP clients to upload. Login to the new hosting account using the FTP credentials, upload the files which you have downloaded to the local system during the process in Step 1. Make sure you upload all the files including the hidden files too, mostly htaccess and some server files are hidden.

Step 4:

Create and Configure Database

Now you have to create a MySQL database and assign a user with full access. To create the database, kindly logon to your new hosting account. After you create your MySQL database and assign a user, ensure that you note down the database credentials for further use.

  • Database Name
  • Username and
  • Password

Kindly store the database credentials for the proceeding migration process.

Once you have created the database, then go to phpMyAdmin and Import the database which you have downloaded the Step 2 of this process.


Import Opencart Database

Step 5:

Edit the config files

At this stage you have completed uploading the files to the server and imported the database to the new hosting account. Now you have to edit the cofiguration files to make the site work properly as in old hosting.

You need to edit config.php files, this file is located in two locations.

  1. root directory and
  2. admin folder

Open the file in text editor and modify the following lines of code

define(‘DB_USERNAME’, ‘your_db_username’);

define(‘DB_PASSWORD’, ‘your_db_password’);

define(‘DB_DATABASE’, ‘your_opencart_database’);

Use the credentials which you have used in Step 4. Replace your_db_username, your_db_password and your_opencart_database with appropriate values.

Repeat the above step with another file config.php in another location, such as admin/config.php. Once you have modified the configurations you are done with the migration.

Congratulations, you have successfully transferred your opencart to another server or new hosting account.


chris March 12, 2018

thanks friend for helpful article


chris April 7, 2018

Great Blog! Its really helpful Blogging is an amazing skill with which you can share your thoughts online.Love your ideas keep up the good work!


prashant sati May 3, 2018

transfer the opencart site it is help me





John May 5, 2018

Hiii,this is very good article I was looking for this from long time, but one question right now i have, can i edit any comment those i have already did earlier .
Thanks again for the article.


Shahzaib May 14, 2018

A very well defined article. I really appreciate your work because
it will help me a lot. Thanks for sharing this valuable information with me.


John May 28, 2018

Blogs are not just for socializing with others but it can also give us useful information. like this just like me I’am a new blogger and this article gave me lots of ideas on how to start blogging to a site or posts.


Asrar May 31, 2018

Hi Sinu, you’re doing great job. I loved it keep it up . : )


Dr. Anand Bhardwaj June 22, 2018

Very Nice blog you have good knowledge.
Thank you for shareing it.


Chris jones June 30, 2018

Very useful and creative
Search Best Institute
in this information
Thank you.


John July 14, 2018

More appreciating blog! Great internet site! It looks extremely good! Maintain a good job!| you are rocking man…!


chris July 16, 2018

Very valuable information, it is not at all blogs that we find this, congratulations I was looking for something like that and found it here.


Submit Your Comment