I have a novice question that you can help me easily. I have installed OC in root. I want to move it to a subfolder in the root. For example,if I have www.mysite.com, I want to move it in www.mysite.com/Subfolder. I have redirected www.mysite.com to www.mysite.com/Subfolder through htaccess in the root. What changes I need to make to config.php and admin/config.php and to htaccess in the Subfolder. Would I need to make changes to other files too in the Subfolder? How to deal with databases in www.mysite.com? Where I need to export it? How can I achieve this? I am using OC 3.0.2.0. I would be thankful for any help.
Kind Regards
AARSLAN KHAN
You need to do few changes in config.php & admin/config.php if you have copied your OC to subfolder,
For Example :
Your current folder path or directory :
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://example.com/opencart-3.0.3.2/upload/admin/');
define('HTTP_CATALOG', 'http://example.com/opencart-3.0.3.2/upload/');
// HTTPS
define('HTTPS_SERVER', 'http://example.com/opencart-3.0.3.2/upload/admin/');
define('HTTPS_CATALOG', 'http://example.com/opencart-3.0.3.2/upload/');
// DIR
define('DIR_APPLICATION', '/opt/lampp/htdocs/opencart-3.0.3.2/upload/admin/');
define('DIR_SYSTEM', '/opt/lampp/htdocs/opencart-3.0.3.2/upload/system/');
define('DIR_IMAGE', '/opt/lampp/htdocs/opencart-3.0.3.2/upload/image/');
define('DIR_STORAGE', '/opt/lampp/htdocs/opencart-3.0.3.2/upload/storage/');
define('DIR_CATALOG', '/opt/lampp/htdocs/opencart-3.0.3.2/upload/catalog/');
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://example.com/subfolder/opencart-3.0.3.2/upload/admin/');
define('HTTP_CATALOG', 'http://example.com/subfolder/opencart-3.0.3.2/upload/');
// HTTPS
define('HTTPS_SERVER', 'http://example.com/subfolder/opencart-3.0.3.2/upload/admin/');
define('HTTPS_CATALOG', 'http://example.com/subfolder/opencart-3.0.3.2/upload/');
// DIR
define('DIR_APPLICATION', '/opt/lampp/htdocs/subfolder/opencart-3.0.3.2/upload/admin/');
define('DIR_SYSTEM', '/opt/lampp/htdocs/subfolder/opencart-3.0.3.2/upload/system/');
define('DIR_IMAGE', '/opt/lampp/htdocs/subfolder/opencart-3.0.3.2/upload/image/');
define('DIR_STORAGE', '/opt/lampp/htdocs/subfolder/opencart-3.0.3.2/upload/storage/');
define('DIR_CATALOG', '/opt/lampp/htdocs/subfolder/opencart-3.0.3.2/upload/catalog/');
Thanks.
Kind Regards:
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
My subfolder config file is
Code: Select all
define('HTTP_SERVER', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/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/');
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.example.com/admin/');
define('HTTP_CATALOG', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/admin/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_CATALOG', '/home/user/public_html/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/');
Kind Regards and Thanks

In config.file, you need to do following changes :
If your file is stored at following path /home/user/public_html/ then add your subfolder path after /home/user/public_html/ then it will be like /home/user/public_html/sub_folder_path/
Code: Select all
define('HTTP_SERVER', 'http://www.example.com/sub_folder_path/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/sub_folder_path/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/sub_folder_path/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/sub_folder_path/system/');
define('DIR_IMAGE', '/home/user/public_html/sub_folder_path/image/');
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.example.com/sub_folder_path/admin/');
define('HTTP_CATALOG', 'http://www.example.com/sub_folder_path/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/sub_folder_path/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/sub_folder_path/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/sub_folder_path/admin/');
define('DIR_SYSTEM', '/home/user/public_html/sub_folder_path/system/');
define('DIR_IMAGE', '/home/user/public_html/sub_folder_path/image/');
define('DIR_CATALOG', '/home/user/public_html/sub_folder_path/catalog/');
Thanks.
Kind Regards :
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
Hello Arslan,aarslankhan wrote: ↑Fri Sep 13, 2019 2:24 pmHello cedcommerceteam,
Your soultion has helped me. I am greately thankful for this.
Your Welcome for the feeback!
Please feel free to contact us if you face any issue in future

Best Regards
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
Users browsing this forum: No registered users and 28 guests