Add new admin user in OpenCart from PHPMyAdmin

A new client project I’m working on requires I duplicate their website, install it on my development server and work on it before transferring it back onto their server once complete.

To do this, I need access to the OpenCart admin panel, but I want to keep the existing admin users where they are and just add myself in as a new one. Without access to the admin area I can’t create this by the normal method, so I have to manually create one in the database before I can log in through the site admin area. Here’s how:

1. Access the site’s database through PHPMyAdmin

2. When in the root of all the tables in the database, click on the SQL tab in the main window

3. Paste in the following:

(9999,1, 'phil.owen', '21232f297a57a5a743894a0e4a801fc3', '',
'Phil', 'Owen', '', '',

In the above example:
phil.owen is the username of the new admin account
21232f297a57a5a743894a0e4a801fc3 is the encrypted password, its for the password ‘admin’
Phil is the first name
Owen is the last name is the email associated with the admin account, so if I forget the password and want to reset it, here’s where the password reminder will go.

4. Click the ‘Go’ button and it will run the command, creating a new user so you can now login.

Useful post? Share it

2 comments on “Add new admin user in OpenCart from PHPMyAdmin

  1. Open cart 2 has extra field “code” so use:
    (9999,1, ‘username’, ‘21232f297a57a5a743894a0e4a801fc3’, ”,
    ‘firstname’, ‘lastname’, ’emailaddress’, ‘ ‘,’ ‘,

Leave a Reply

Your email address will not be published. Required fields are marked *