Since OpenCart is open source it can be a target for hackers since they already know the basic file structure and how the core code works. One of the easiest methods of securing your OpenCart dashboard is to rename the /admin/ folder.
admin
’ folder (this is your root directory, usually called ‘public_html’ or ‘www’).admin/config.php
file with any php/text editor software (remember, you changed the name of the folder. Replace ‘admin’ with the new folder name).admin
’ throughout the config file. All instances must be changed for this to work. Below there are instances of admin (marked in double quotes) you will need to change. / HTTP
define('HTTP_SERVER', 'http://yourdomain.com/opencart/"admin"/');
define('HTTP_CATALOG', 'http://yourdomain.com/opencart/');
// HTTPS
define('HTTPS_SERVER', 'http://yourdomain.com/opencart/"admin"/');
define('HTTPS_CATALOG', '>http://yourdomain.com/opencart/');
// DIR
define('DIR_APPLICATION', '/public_html/opencart/"admin"/');
define('DIR_SYSTEM', '/public_html/opencart/system/');
define('DIR_DATABASE', '/public_html/opencart/system/database/');
define('DIR_LANGUAGE', '/public_html/opencart/"admin"/language/');
define('DIR_TEMPLATE', '/public_html/opencart/"admin"/view/template/');
define('DIR_CONFIG', '/public_html/opencart/system/config/');
define('DIR_IMAGE', '/public_html/opencart/image/');
define('DIR_CACHE', '/public_html/opencart/system/cache/');
define('DIR_DOWNLOAD', '/public_html/opencart/download/');
define('DIR_LOGS', '/public_html/opencart/system/logs/');
define('DIR_CATALOG', '/public_html/opencart/catalog/');
There should be 5 instances of /admin/ folder that would need to be updated to the new name you changed the folder to
Once you are done, you will be able to access OpenCart dashboard using new admin panel path.If you face any problems or need our professional services, please email us at [email protected]
Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.