The configuration file serves for the initial setup of the site on the OpenCart engine, the main function of which is to connect the site to the database.
The file itself is called config.php and is located in the root directory of the site, as well as in the admin directory, the absolute path to which you can find out in your control panel
define('DB_HOSTNAME', 'СЕРВЕР РОЗМІЩЕННЯ БАЗИ ДАНИХ'); define('DB_USERNAME', 'КОРИСТУВАЧ БАЗИ ДАНИХ'); define('DB_PASSWORD', 'ПАРОЛЬ КОРИСТУВАЧА БАЗИ ДАНИХ'); define('DB_DATABASE', 'НАЗВА БАЗИ ДАНИХ'); define('DB_PORT', '3306'); define('DB_PREFIX', 'ПРЕФІКС ТАБЛИЦЬ');
A feature of OpenCart is the same usage the absolute URL of the domain , which will be used globally in the engine
define('HTTP_SERVER', 'https://DOMAIN_NAME/'); define('HTTPS_SERVER', 'https://DOMAIN_NAME/');
for admin/config.php :
define('HTTP_SERVER', 'https://DOMAIN_NAME/admin/'); define('HTTP_CATALOG', 'https://DOMAIN_NAME/'); // HTTPS define('HTTPS_SERVER', 'https://DOMAIN_NAME/admin/'); define('HTTPS_CATALOG', 'https://DOMAIN_NAME/');
Also, when moving the site, you must correctly specify the absolute paths to the modules of the CMS itself:
define('DIR_APPLICATION', '/var/www/HOSTING_LOGIN/www/DOMAIN_NAME/catalog/'); define('DIR_SYSTEM', '/var/www/HOSTING_LOGIN/www/DOMAIN_NAME/system/'); define('DIR_IMAGE', '/var/www/HOSTING_LOGIN/www/DOMAIN_NAME/image/'); define('DIR_STORAGE', '/var/www/HOSTING_LOGIN/www/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/');
— HOSTING_LOGIN - the name of your hosting account; — DOMAIN_NAME - the name of your domain; — DIR_STORAGE - OpenCart itself requires security to move the storage directory outside the scope of the directory with the main site. In this example, the storage directory is moved to a level above the site directory, into a directory with all sites. details here : [link to instructions] |
All question categories