When working with programs such as OpenCart, strange things can happen. At times, even unexplainable incidents such as disappearing admin accounts can occur. While this is a rare occurrence, and usually due to an accident while playing with the database, it can play havoc when trying to fix the issue. You would need to access the admin area to create or promote an account to the admin role. However, without an account to access the admin area, you are stuck. You need to have a plan for inserting an emergency admin account into your OpenCart application database. Below are the instructions for doing just that.

How to create an emergency admin account in OpenCart

  1. To begin, you will need to access your cPanel account.
  2. Entering at the cPanel main area, you will want to find the Databases category and then click on the phpMyAdmin tool icon.
  3. Once inside, look to the list of databases on the left. Find and click on the database for your OpenCart application. If you do not know which database is the one to use, you can find out using our article: Finding your OpenCart database name.
  4. Clicking on the database name brings up the specific information in the right hand panel. Across the top are several tabs, click on the SQL tab.
  5. This brings up the SQL query editor where we will enter the code to create an admin account in the database. Below is the code you want to cut and paste into the query editor:

    (9999,1, 'admin123', '21232f297a57a5a743894a0e4a801fc3', '',
    'firstname', 'lastname', ' This email address is being protected from spambots. You need JavaScript enabled to view it. ', '',

    Although you can edit the fields with 'firstname','lastname', and ' This email address is being protected from spambots. You need JavaScript enabled to view it. ' to be real names and email, do not edit any other fields. Click GO at the lower right corner to run the code and add it to the database.
  6. You will see a success message once the process is complete. You can now log into the admin area of your OpenCart with the username 'admin123' and the password 'admin'.


Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.