Post by aarslankhan » Wed Sep 11, 2019 2:45 pm

Hi guys,
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

New member

Posts

Joined
Tue Mar 20, 2018 3:11 pm

Post by cedcommerceteam » Wed Sep 11, 2019 5:48 pm

Hello AARSLAN,
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/');
You subfolder directory where OC moved :

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/');
Please try now 7 let us know the consequences.

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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by aarslankhan » Wed Sep 11, 2019 8:51 pm

Thanks cedcommerceteam for your help and time. I have tried your solution. Sorry but it did not work. And also my config files are different. I am confused, please guide me with respect to my config files.
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/');
and my subfolder admin/config.php is

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/');
Please advise me how to edit my Subfolder config.php and Subfolder/admin/config.php and in which places I need to put my Subfolder.
Kind Regards and Thanks :)

New member

Posts

Joined
Tue Mar 20, 2018 3:11 pm

Post by cedcommerceteam » Thu Sep 12, 2019 3:32 pm

Hi there,

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/');
similarly in admin/config.php file

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/');
I hope this will work now. Try this way & let us know.

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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by johnp » Thu Sep 12, 2019 4:25 pm

If you're using the htaccess file check that as you will probably need to add the subfolder to that. :)

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 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 http://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by aarslankhan » Fri Sep 13, 2019 2:24 pm

Hello cedcommerceteam,
Your soultion has helped me. I am greately thankful for this.

New member

Posts

Joined
Tue Mar 20, 2018 3:11 pm

Post by cedcommerceteam » Sat Sep 14, 2019 12:16 pm

aarslankhan wrote:
Fri Sep 13, 2019 2:24 pm
Hello cedcommerceteam,
Your soultion has helped me. I am greately thankful for this.
Hello Arslan,
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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: No registered users and 27 guests