Migrate opencart from local to server
Step 1: Backup database from local server.
Step 2: Backup OpenCart shop folder from local server.
Step 3: Create and import database to hosting server.
Step 4: Copy OpenCart shop folder contents to server, where your domain points to.
Step 5: Update configuration files.
Here is the interesting part:
In the root folder and admin folder of your newly copied
OpenCart website, you will see that both have a config.php file. Open
them both in your favorite code editor. Intially, this is what they
might look like:
root folder:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| // HTTP// HTTPS// DIRdefine('DIR_APPLICATION', 'C:\xampp\htdocs\merchant/catalog/');define('DIR_SYSTEM', 'C:\xampp\htdocs\merchant/system/');define('DIR_DATABASE', 'C:\xampp\htdocs\merchant/system/database/');define('DIR_LANGUAGE', 'C:\xampp\htdocs\merchant/catalog/language/');define('DIR_TEMPLATE', 'C:\xampp\htdocs\merchant/catalog/view/theme/');define('DIR_CONFIG', 'C:\xampp\htdocs\merchant/system/config/');define('DIR_IMAGE', 'C:\xampp\htdocs\merchant/image/');define('DIR_CACHE', 'C:\xampp\htdocs\merchant/system/cache/');define('DIR_DOWNLOAD', 'C:\xampp\htdocs\merchant/download/');define('DIR_LOGS', 'C:\xampp\htdocs\merchant/system/logs/');// DBdefine('DB_DRIVER', 'mysql');define('DB_HOSTNAME', 'localhost');define('DB_USERNAME', 'root');define('DB_PASSWORD', '');define('DB_DATABASE', 'merchant_db');define('DB_PREFIX', '');?> |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| // HTTP// HTTPS// DIRdefine('DIR_APPLICATION', 'C:\xampp\htdocs\merchant/admin/');define('DIR_SYSTEM', 'C:\xampp\htdocs\merchant/system/');define('DIR_DATABASE', 'C:\xampp\htdocs\merchant/system/database/');define('DIR_LANGUAGE', 'C:\xampp\htdocs\merchant/admin/language/');define('DIR_TEMPLATE', 'C:\xampp\htdocs\merchant/admin/view/template/');define('DIR_CONFIG', 'C:\xampp\htdocs\merchant/system/config/');define('DIR_IMAGE', 'C:\xampp\htdocs\merchant/image/');define('DIR_CACHE', 'C:\xampp\htdocs\merchant/system/cache/');define('DIR_DOWNLOAD', 'C:\xampp\htdocs\merchant/download/');define('DIR_LOGS', 'C:\xampp\htdocs\merchant/system/logs/');define('DIR_CATALOG', 'C:\xampp\htdocs\merchant/catalog/');// DBdefine('DB_DRIVER', 'mysql');define('DB_HOSTNAME', 'localhost');define('DB_USERNAME', 'root');define('DB_PASSWORD', '');define('DB_DATABASE', 'merchant_db');define('DB_PREFIX', '');?> |
root folder:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| // HTTP// HTTPS// DIRdefine('DIR_APPLICATION', '/home/your_hosting/public_html/catalog/');define('DIR_SYSTEM', '/home/your_hosting/public_html/system/');define('DIR_DATABASE', '/home/your_hosting/public_html/system/database/');define('DIR_LANGUAGE', '/home/your_hosting/public_html/catalog/language/');define('DIR_TEMPLATE', '/home/your_hosting/public_html/catalog/view/theme/');define('DIR_CONFIG', '/home/your_hosting/public_html/system/config/');define('DIR_IMAGE', '/home/your_hosting/public_html/image/');define('DIR_CACHE', '/home/your_hosting/public_html/system/cache/');define('DIR_DOWNLOAD', '/home/your_hosting/public_html/download/');define('DIR_LOGS', '/home/your_hosting/public_html/system/logs/');// DBdefine('DB_DRIVER', 'mysql');define('DB_HOSTNAME', 'localhost');define('DB_USERNAME', 'your_hosting_database_username');define('DB_PASSWORD', 'your_hosting_database_password');define('DB_DATABASE', 'your_hosting_database');define('DB_PREFIX', '');?> |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| // HTTP// HTTPS// DIRdefine('DIR_APPLICATION', '/home/your_hosting/public_html/admin/');define('DIR_SYSTEM', '/home/your_hosting/public_html/system/');define('DIR_DATABASE', '/home/your_hosting/public_html/system/database/');define('DIR_LANGUAGE', '/home/your_hosting/public_html/admin/language/');define('DIR_TEMPLATE', '/home/your_hosting/public_html/admin/view/template/');define('DIR_CONFIG', '/home/your_hosting/public_html/system/config/');define('DIR_IMAGE', '/home/your_hosting/public_html/image/');define('DIR_CACHE', '/home/your_hosting/public_html/system/cache/');define('DIR_DOWNLOAD', '/home/your_hosting/public_html/download/');define('DIR_LOGS', '/home/your_hosting/public_html/system/logs/');define('DIR_CATALOG', '/home/your_hosting/public_html/catalog/');// DBdefine('DB_DRIVER', 'mysql');define('DB_HOSTNAME', 'localhost');define('DB_USERNAME', 'your_hosting_database_username');define('DB_PASSWORD', 'your_hosting_database_password');define('DB_DATABASE', 'your_hosting_database');define('DB_PREFIX', '');?> |
0 komentar:
Post a Comment