InMotion Hosting Support Center

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.
Was this article helpful?
Continued Education in Course OpenCart
You are viewing Section 21: 340: How to find your database name for OpenCart 1.5
Section 20: 341: Disable product reviews in OpenCart 1.5
Section 22: 339: How to reset my OpenCart Admin Password

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

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2018-01-27 5:21 am

great work

n/a Points
2014-08-15 5:40 am
this is awesome

Post a Comment

Email Address:
Phone Number:

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

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


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:
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!