Most features and changes for your shop can be done within the PrestaShop back office. However, there may be times when you need to directly interact with the database. This could be due to troubleshooting or even making mass changes to the database that are not available in the back office. In this case, however, you will need to know the database name.
While this is easy if you are only using one database on your account, some accounts have dozens of databases running. It then becomes like a needle in a haystack. Below are steps to take to find your database name.
How to find the database name for PrestaShop 1.5
- Log into your cPanel dashboard.
- Now that you are in the cPanel, enter the File Manager.
- Once you enter the File Manager, navigate to the root folder for your PrestaShop store. In our example, the folder is named prestashop and is under the public_html root folder.
- Under the root folder for your PrestaShop store, locate and enter the config folder.
- Now that you are in the config folder, you will need to open the settings.inc.php file. To open the file, highlight it and click on the Edit icon located in the toolbar across the top.
- You will see several lines of text inside the file. Look for the line of code with DB_NAME in it. Using the line of code below as an example, the second parameter is the full database name, which is compiled of the cPanel username (userna5) and the database name (_presta1).
define('_DB_NAME_', 'userna5_presta1');
- Be sure to write database name down so you can remember reference it later. This allows you to quickly locate your database when using tools like phpMyAdmin no matter how many databases are in the list.
We value your feedback!
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.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!