How to Reset or Change OpenCart Administrator Password

If you just need to regain access, and want to change or reset your password then you can do so pretty easily.

It is a very smart tricks for Opencart CMS to access Administration Dashboard without admin login id and password.


Open system/library/cart/user.php ( system/library/user.php for older version of opencart) and find the line beginning

$user_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "user WHERE username =

Before the WHERE put a # changing it to

$user_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "user #WHERE username =

and save. This allows you to log in using the first account (usually the default admin account) without any user and password. As soon as you do, reverse this and save again. You'll still be logged in and can edit the user data editing the password as you wish.

Post a Comment

0 Comments