Knowledgebase

How to change the Prestashop key using phpmyadmin

On many occasions, we find ourselves wanting tochange a customer's password or we want to change the PrestaShop backoffice password. The first step we take is to go there backoffice to access and press the typical phrase: “He forgot my password” and it doesn't work :(. That's when the “despair” comes and we ask ourselves: «¿What's next?». Don't worry, it's not necessary to be a Expert programmer in PrestaShop, in this post I explain how to solve this problem.

Tutorial on how to change the PrestaShop password by database in phpMyAdmin

Step 1.- Search for the cookie key

The first point is to look for the cookie key for our PrestaShop, but ¿what is the cookie key? The cookie key is generated for installing our PrestaShop, and it is a character string that is used to generate passwords for our online store.

Now that we know the function of the cookie key, let's get to it. Depending on which version of PrestaShop we have installed, the cookie key will be found in different files:

Cookie key in PrestaShop 1.6

For version 1.6 we will find it in the settings.inc.php file in the /config route

Cookie key in PrestaShop 1.7

For version 1.7 we will find it in the parameters.php file on the /appp/config route

Within these files we will copy the cookie key that we will use in the following steps:

Step 2.- Access the database

In this step we will access phpMyAdmin using the hosting panel that we have, normally this will be Plesk or cPanel. The mission is to search and access the database.

Inside it we select phpMyAdmin in our PrestaShop database.

Step 3.- Change the password in the database

Within the database, we can change the password of a client or an employee. In this case, let's change it as an employee, and then we'll see how to do it for a client.

In PrestaShop, the employees are stored on the employee table, we go to that table and press edit on the employee we want to change the password.

Now we go to the «passwd» field and we have to copy the cookie key followed by the password we want to enter and select MD5. To decide, if we want to put the password «atlanticadigital» in the passwd value field it will look like this:

d9a7541c2415bd1930d9fad149ffc76ccpT4bKEkfdwf46uzv0IQbd2atlanticadigital

Click on "Continue" to generate the change and that's all.

As simple as that it would be to change an employee's password unless he receives a mail without it being entered :D. If we wanted to change a customer's password, it would be exactly the same steps but in the customer table.

  • 0 Users Found This Useful
Was this answer helpful?