OpenCart – Moving your Existing Installation to Arvixe

Moving an entire website that you have spent a long time creating can be a scary task especially with the possibility of data loss. However, sometimes circumstances warrant a move. This article will tell you how to do it the proper way to endure a smooth transition. This process is actually not that difficult if you follow the directions and make sure all of your t’s are crossed and your i’s dotted.

Preliminary tasks:

Before you even get started you will want to sign up with an ARVIXE HOSTING ACCOUNT.  Since at this point your website is still hosted on your OTHER SERVER  you will not want to mess with the Name Servers or begin a domain transfer until you have all of your files set up and your website is ready to be presented to the web.

Step 1: Exporting Your OpenCart MySQL Database

Login to your cPanel and access your database using PHP MYADMIN. If you are not using phpMyAdmin you will still need to login to the software of your choice and export the SQL.

screen1

Continuing on, after you have logged into PHP MY ADMIN it is now time to export your database to a file on your hard drive. At the top menu click on EXPORT. Make sure that you are not inside a table when doing this because it will only export that one table and its data. The best way to know that you are doing this correctly is to click on EXPORT immediately after logging in.

screen2

Once you click on EXPORT you want to make sure all tables are chosen “which is normally by default” and choose a file type to export.

screen3

I personally find that it is best to export at SQL which will be most compatible depending upon your new server. Now click GO and let it save as a file on your hard drive.

Step 2: Backing Up Your Website

Login to an FTP program like FILE ZILLA and prepare to back up your entire store. You do this by creating a folder on your desktop and just DOWNLOADING all of the files to that folder. Make “sure” that the download is complete before shutting down your FTP.

Step 3: Uploading your website to Arvixe

Again, login to your new Arvixe hosting server with an FTP program like File Zilla. The login credentials you should already have if have signed up with an Arvixe Hosting Account. Upload the files that you downloaded and make sure the upload is complete. Now login to your cPanel and navigate to MYSQL DATABASES

screen4

Commence to create your new database. Name it anything want because we are going to change those credentials in your config files later on.

scren5

Once you have set up your new database name you must now assign/setup a database user that has all privileges. Now login to phpMYadmin and select your new database. Once you have selected it you will see that it has 0 tables. You must now click on IMPORT and browse for the SQL file that you exported to your hard drive.  Let the system work. It may take a little while depending upon the size of your database.

Step 4: Amending your config.php files

You must now alter your /config.php and /admin/config.php files. We do this to match the new server DIRECTORY. In a text editor “or your choice of code editor” open up /config.php

NOTE: THE DOMAIN NAME WILL OBVIOUSLY BE THE SAME UNLESS YOU HAVE CHANGED NAMES COMPLETELY.

The Standard HTTP root files

// HTTP
define('HTTP_SERVER', 'http://www.[YOUR NEW DOMAIN].com/');
define('HTTP_IMAGE', 'http://www.[YOUR NEW DOMAIN].com/image/');
define('HTTP_ADMIN', 'http://www.[YOUR NEW DOMAIN].com/admin/');

The Secure Connection root file path

// HTTPS
define('HTTPS_SERVER', 'http://www.[YOUR NEW DOMAIN].com/');
define('HTTPS_IMAGE', 'http://www.[YOUR NEW DOMAIN].com/image/');

The Global Directory Paths

// DIR
define('DIR_APPLICATION', '/catalog/');
define('DIR_SYSTEM', '/system/');
define('DIR_DATABASE', '/system/database/');
define('DIR_LANGUAGE', '/catalog/language/');
define('DIR_TEMPLATE', '/catalog/view/theme/');
define('DIR_CONFIG', '/system/config/');
define('DIR_IMAGE', '/image/');
define('DIR_CACHE', '/system/cache/');
define('DIR_DOWNLOAD', '/download/');
define('DIR_LOGS', '/system/logs/');

Your OpenCart MySQL Database Connection Details

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', '[MYSQL HOST]');
define('DB_USERNAME', '[MYSQL USERNAME]');
define('DB_PASSWORD', '[MYSQL PASSWORD]');
define('DB_DATABASE', '[MYSQL DATABASE NAME]');
define('DB_PREFIX', '[MYSQL DATABASE PREFIX]');//The standard is "opn_" without quotes

The Admin Config file works exactly the same but you have to add the “/admin” element to each file location. Such as below:

// HTTP
define('HTTP_SERVER', 'http://www.[YOUR NEW DOMAIN].com/admin/');
define('HTTP_CATALOG', 'http://www.[YOUR NEW DOMAIN].com/');
define('HTTP_IMAGE', 'http://www.[YOUR NEW DOMAIN].com/image/');

// HTTPS
define('HTTPS_SERVER', 'http://www.[YOUR NEW DOMAIN].com/admin/');
define('HTTPS_IMAGE', 'http://www.[YOUR NEW DOMAIN].com/image/');

// DIR
define('DIR_APPLICATION', '/admin/');
define('DIR_SYSTEM', '/system/');
define('DIR_DATABASE', '/system/database/');
define('DIR_LANGUAGE', '/admin/language/');
define('DIR_TEMPLATE', '/admin/view/template/');
define('DIR_CONFIG', '/system/config/');
define('DIR_IMAGE', '/image/');
define('DIR_CACHE', '/system/cache/');
define('DIR_DOWNLOAD', '/download/');
define('DIR_LOGS', '/system/logs/');
define('DIR_CATALOG', '/catalog/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', '[MYSQL HOST]');
define('DB_USERNAME', '[MYSQL USERNAME]');
define('DB_PASSWORD', '[MYSQL PASSWORD]');
define('DB_DATABASE', '[MYSQL DATABASE]');
define('DB_PREFIX', '[MYSQL PREFIX]');//Same as before with the "opn_" as standard

Step 5: Changing Nameservers/Transfer

Now, after everything is set up on your new server you can safely point the domain towards Arvixe. This is to allow your website to show up on the Arvixe Server instead of your other server. You also will want to initiate a Domain Transfer after you re-point the name servers. The domain transfer will make sense because it joins the domain with the hosting provider. DNS may take a while to propagate so just be patient and wait for it to show up. The Name Server information is listed within your Domain Management inside Arvixe hosting account.

Looking for quality OpenCart Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under OpenCart | RSS 2.0

Author Spotlight

Joe Stenhouse

Joe Stenhouse

I am a web application developer that specializes in PHP, JAVASCRIPT, MYSQL, HTML, and CSS. We manifest exciting potentials within the world wide web through means of innovation.

Leave a Reply

Your email address will not be published. Required fields are marked *


× 8 = 8

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>