Reset Admin Password

One of the easiest way to reset the data in the database. 

1. Log into PHPMyAdmin, to go your opencart database and go to SQL tab. 

2. Run query below - replace: reallylongpassword, admin username and 'oc_' with yourdatabase prefix

UPDATE `oc_user` SET `password` = md5('really!!long!!!secure!!!!password') WHERE `username` = 'admin';


Another way with only FTP access upload a PHP script which runs the above query.

E.g. paste this into a file reset-admin-password.php and upload to the root (same folder as config.php). Then visit this file in a browser or command line.


<?php

require_once('config.php');
if (file_exists(DIR_SYSTEM . 'library/db/' . DB_DRIVER . '.php')){
require DIR_SYSTEM . 'library/db/' . DB_DRIVER . '.php';
} else {
require DIR_SYSTEM . 'database/' . DB_DRIVER . '.php';
}
require DIR_SYSTEM . 'library/db.php';
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$sql = "UPDATE `".DB_PREFIX."user` SET password = md5('reallylongpassword') WHERE username = 'admin'";
$result = $db->query($sql);
var_dump($result);
die('DONE!');

Featured

Professional Email Template - Advanced

Professional Email Template - Advanced

Responsive HTML Email template - not only will your emails look professional on all desktop computer

£17.50

Customer Pre-Sale Emails

Customer Pre-Sale Emails

MODULE REQUIRES Professional Email Templates - Advanced. The complete solution to emailing custom

£10.00 £20.00

Order Follow-Up Emails

Order Follow-Up Emails

MODULE REQUIRES Professional Email Templates - Advanced. The complete solution to emailing custom

£10.00 £30.00

Email Validation

Email Validation

This extension allows you to validate your customer’s email address. Keep your mailing lists free of

FREE