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

£25.00

Customer Pre-Sale Emails

Customer Pre-Sale Emails

The complete solution to emailing customers before they purchase (we have another extension for

£20.00

Order Follow-Up Emails

Order Follow-Up Emails

The complete solution to emailing customers after they've placed an order (we have another extension

£20.00

Email Verification

Email Verification

Require customers to validate their email address before they are allowed to login by clicking

FREE