1) Download OpenCart
2) On the web server create a folder named “www” in the root directory of your domain name. (e.g. /yourdomain.com/www)
3) Copy all contents of the upload folder into the new “www” folder.
4) In the root of the “www” folder rename the file “config-dist.php” to “config.php” do the same to the “config-dist.php” file in the /admin folder as well. Make sure to CHMOD both files to 755 or 777.
5) To install navigate your web browser to yourdomain.com the installer should popup.
6) Put all the information it wants and hit the install button.
7) Login to the admin control panel either by the link that will be there or by using [URL] http://www.yourdomain.com/admin [/URL]
8) OpenCart will now tell you to Delete the install folder so do so.
9) OpenCart will also tell you to move your “system/storage” folder to a folder below your domain root. Choose move folder manually and take note of the folder location. You can just leave the popup box and admin control panel open for now.
10) Cut/Copy the “storage” folder located (yourdomain/www/system/storage) to your domain root (e.g. yourdomain/storage).
11) Now edit both your config files named “config.php” located in the “www” folder and the “www/admin” folder, then save.
• Find file “config.php” loacted (yourdomain/www/config.php)
• On line 12 you should see:
[PHP]define(‘DIR_STORAGE’, DIR_SYSTEM . ‘storage/’);[/PHP]
Change to:
[PHP]define(‘DIR_STORAGE’, ‘/home/content/38/3646338/html/-domains/yourdomain.com/storage/’);[/PHP]
Your path will be different but you should figure it out.
• Find file “config.php” loacted (yourdomain/www/admin/config.php)
• On line 14 you should see:
[PHP]define(‘DIR_STORAGE’, DIR_SYSTEM . ‘storage/’);[/PHP]
Change to:
[PHP]define(‘DIR_STORAGE’, ‘/home/content/38/3646338/html/-domains/yourdomain.com/storage/’);[/PHP]
Your path will be different but you should figure it out.
12) Now make sure you CHMOD both config.php files to CHMOD 0640 or just 640
13) Refresh the admin control panel by pressing Ctrl and F5 at the same time. Also clear website cache using the button at the top right of the main opencart admin page.
Some people say if you get lots of errors to try this:
Lastly, to comment out or remove the entire line in your .htaccess file where it says: ^system/storage folder. Clear your OC cache from your admin – > dashboard – > blue square icon and from your admin – > extensions – > modifications – > refresh button.
Example www/config.php file:
[PHP]<?php
// HTTP
define('HTTP_SERVER', ' http://cheykawebdesign.com/demos/opencart1/www/');
// HTTPS
define('HTTPS_SERVER', ' http://cheykawebdesign.com/demos/opencart1/www/');
// DIR
define('DIR_APPLICATION', '/home/content/38/3646338/html/demos/opencart1/www/catalog/');
define('DIR_SYSTEM', '/home/content/38/3646338/html/demos/opencart1/www/system/');
define('DIR_IMAGE', '/home/content/38/3646338/html/demos/opencart1/www/image/');
define('DIR_STORAGE', '/home/content/38/3646338/html/demos/opencart1/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'wsopencart1.db.3646338.b57.hostedresource.net');
define('DB_USERNAME', 'wsopencart1');
define('DB_PASSWORD', 'CwD!1979!20');
define('DB_DATABASE', 'wsopencart1');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
[/PHP]
Example www/admin/config.php file:
[PHP]// HTTP
define('HTTP_SERVER', ' http://cheykawebdesign.com/demos/opencart1/www/admin/');
define('HTTP_CATALOG', ' http://cheykawebdesign.com/demos/opencart1/www/');
// HTTPS
define('HTTPS_SERVER', ' http://cheykawebdesign.com/demos/opencart1/www/admin/');
define('HTTPS_CATALOG', ' http://cheykawebdesign.com/demos/opencart1/www/');
// DIR
define('DIR_APPLICATION', '/home/content/38/3646338/html/demos/opencart1/www/admin/');
define('DIR_SYSTEM', '/home/content/38/3646338/html/demos/opencart1/www/system/');
define('DIR_IMAGE', '/home/content/38/3646338/html/demos/opencart1/www/image/');
define('DIR_STORAGE', '/home/content/38/3646338/html/demos/opencart1/storage/');
define('DIR_CATALOG', '/home/content/38/3646338/html/demos/opencart1/www/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'wsopencart1.db.3646338.b57.hostedresource.net');
define('DB_USERNAME', 'wsopencart1');
define('DB_PASSWORD', 'CwD!1979!20');
define('DB_DATABASE', 'wsopencart1');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
// OpenCart API
define('OPENCART_SERVER', ' https://www.opencart.com/');
[/PHP]
Other references: [URL] https://base5builder.com/blog/how-to-correctly-install-opencart-3-set-up-properly [/URL]