When working with ecommerce programs such as OpenCart, the vast majority of features and settings are taken care of in the administrative dashboard. There will come a time, however, when you will need to access or interact with the database directly, most often through some sort of troubleshooting. When this happens, you will need to know the exact database name that your OpenCart installation uses in order to interact. Working with the wrong database will not help your OpenCart application and could break another application as well. The following steps will guide you in how to locate the correct database name for your OpenCart application.

Finding the database name for your OpenCart application

  1. First, log into your cPanel dashboard.
  2. Once inside the cPanel, you will need to enter the File Manager.
  3. After entering the File Manager, navigate to the root folder for your OpenCart store. In our example, the folder is named opencart and is under the public_html root folder. This makes the folder path public_html/opencart.
  4. Under the root folder for your OpenCart store, locate and enter the folder named admin.
  5. Once inside the admin folder, look for the file named config.php file. To open the file, highlight it and click on the Edit icon located in the toolbar across the top.
    click edit toolbar button
  6. Once you open the file you will see many settings. Look for the line of code with DB_DATABASE in it. You will see the database name in the right side of the code line. In our example, the database name would be _opencrt1. The prefix will always be your cPanel username, in this case it is userna5. You can see a sample line of code below:
    define('DB_DATABASE', 'userna5_opencrt1');
  7. Be sure to write down the database name so you can remember it. Now you can locate the particular database to use for editing no matter how many you have in your account.
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 our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

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

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2230
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5654

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!
Ask a Question

Need more Help?

Search

Ask the Community!

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

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!