Hello. I have a website hosted on a Linux server. To test updates I need to run it locally. I have installed XAMPP in my local Windows 10 machine, have downloaded my public_html folder where the website is contained and now I need to run my existing website in XAMPP. I know how to run a new instance of OpenCart. My version is 1.5.6.4.
Do I just have to edit the config.php values? If so how?
You need to set up the database, and edit the config.php and admin/config.php. Edit the filesystem paths to OpenCart folders, URLs to OpenCart frontend and admin, and database access details.rgfuelcells wrote: ↑Tue Jun 29, 2021 10:19 amHello. I have a website hosted on a Linux server. To test updates I need to run it locally. I have installed XAMPP in my local Windows 10 machine, have downloaded my public_html folder where the website is contained and now I need to run my existing website in XAMPP. I know how to run a new instance of OpenCart. My version is 1.5.6.4.
Do I just have to edit the config.php values? If so how?
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
For setting up the database I remember following these steps in getting there:rjcalifornia wrote: ↑Tue Jun 29, 2021 9:51 pm
You need to set up the database, and edit the config.php and admin/config.php. Edit the filesystem paths to OpenCart folders, URLs to OpenCart frontend and admin, and database access details.
https://studyopedia.com/opencart/how-to ... localhost/
And is this what you meant by editing the filesystem path to OpenCart folders and URLs to OpenCart?
_/config.php
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/_/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost/_/');
// DIR
define('DIR_APPLICATION', 'C:\xampp\htdocs\_/catalog/');
define('DIR_SYSTEM', 'C:\xampp\htdocs\_/system/');
define('DIR_DATABASE', 'C:\xampp\htdocs\_/system/database/');
define('DIR_LANGUAGE', 'C:\xampp\htdocs\_/catalog/language/');
define('DIR_TEMPLATE', 'C:\xampp\htdocs\_/catalog/view/theme/');
define('DIR_CONFIG', 'C:\xampp\htdocs\_/system/config/');
define('DIR_IMAGE', 'C:\xampp\htdocs\_/image/');
define('DIR_CACHE', 'C:\xampp\htdocs\_/system/cache/');
define('DIR_DOWNLOAD', 'C:\xampp\htdocs\_/download/');
define('DIR_LOGS', 'C:\xampp\htdocs\_/system/logs/');
// DB
define('DB_DRIVER', <DB_DRIVER>);
define('DB_HOSTNAME', <DB_HOSTNAME>);
define('DB_USERNAME', <DB_USERNAME>);
define('DB_PASSWORD', <DB_PASSWORD>);
define('DB_DATABASE', <DB_DATABASE>);
define('DB_PREFIX', <DB_PREFIX>);
?>
_/admin/config.php
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/_/admin/');
define('HTTP_CATALOG', 'http://localhost/_/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost/_/admin/');
define('HTTPS_CATALOG', 'http://localhost/_/');
// DIR
define('DIR_APPLICATION', 'C:\xampp\htdocs\_/admin/');
define('DIR_SYSTEM', 'C:\xampp\htdocs\_/system/');
define('DIR_DATABASE', 'C:\xampp\htdocs\_/system/database/');
define('DIR_LANGUAGE', 'C:\xampp\htdocs\_/admin/language/');
define('DIR_TEMPLATE', 'C:\xampp\htdocs\_/admin/view/template/');
define('DIR_CONFIG', 'C:\xampp\htdocs\_/system/config/');
define('DIR_IMAGE', 'C:\xampp\htdocs\_/image/');
define('DIR_CACHE', 'C:\xampp\htdocs\_/system/cache/');
define('DIR_DOWNLOAD', 'C:\xampp\htdocs\_/download/');
define('DIR_LOGS', 'C:\xampp\htdocs\_/system/logs/');
define('DIR_CATALOG', 'C:\xampp\htdocs\_/catalog/');
// DB
define('DB_DRIVER', <DB_DRIVER>);
define('DB_HOSTNAME', <DB_HOSTNAME>);
define('DB_USERNAME', <DB_USERNAME>);
define('DB_PASSWORD', <DB_PASSWORD>);
define('DB_DATABASE', <DB_DATABASE>);
define('DB_PREFIX', <DB_PREFIX>);
?>
I changed out some values with angled brackets for security reasons even thought they can only be used in my local drive. My live website host changes the name of the public_html folder to "_" for some reason so that's where the root of my website is in. And should I also be editing .htaccess somehow to run my website in localhost?
Who is online
Users browsing this forum: No registered users and 21 guests