From the PrestaShop database, you can manually modify the PrestaShop administrator password (also known as Back Office) without needing to log into the admin panel itself.
To do this, the first step is to obtain the cookie_key of your PrestaShop in order to modify the password. You must access your web files via FTP to view the file /web/app/config/parameters.php
You must "View" the parameters.php file in order to see the information it contains:
You must copy the code without the quotation marks "", as shown below:
Once you have copied the PrestaShop cookie_key, you can proceed to modify the administrator user's password.
Next, you need to access the PrestaShop database to make the changes as mentioned above.
Once you have accessed phpMyAdmin to manage all the databases created in your hosting, you must go to the database associated with your PrestaShop (if you do not know which one it is, it also appears in the parameters.php file shown above). You must locate the ps_employee table in the database as shown in the following image:
You must copy the email address of the user you want to modify, as you will need it in the next steps:
In this PrestaShop table, all users created in your PrestaShop Back Office will appear. Click on "SQL" to modify the password.
In this phpMyAdmin section, you can run commands directly on that specific table. You must execute the following command as shown in the image:
UPDATE `psoa_employee` SET passwd=md5('HUapLkRPdYReiag7hFRBTNtFuLAgiyNPp84vRnkobiRLTMbhMMIOqyjKEZhxnLuvNuevopassword123') WHERE email="our@email.com"
This is the step that modifies the password, so it is important to do it correctly. In your case, you must replace the code that appears after passwd=md5 with your cookie_key, and then write the password you want to assign to the user. In our example, the password would be Newpassword123.
It is also important to enter the email address associated with that PrestaShop user.
Once the change is made, click on "Continue" to save the changes:
After clicking "Continue", the changes should be accepted and the new password applied.
IMPORTANT: It is possible that phpMyAdmin denies the change by displaying an error like the following:
In that case, the change can be made in a different way.
The process is quite similar. You must go to the ps_employee table as in the previous method. In this case, click directly on "Edit" for the user you want to modify:
Next, go to the passwd field and paste the cookie_key together with the new password as we did in the previous step. It is important to select the MD5 encoding. We show an example image below:
Finally, simply click on "Continue" at the bottom to save the changes:
If the change has been processed correctly, phpMyAdmin will display the following confirmation: