If you've forgotten or lost your PrestaShop admin password you will need to reset it. You have two options for resetting this password in PrestaShop: the "Lost password" link on the PrestaShop admin log in page, or through your PrestaShop database. In this tutorial, we'll walk you through both options.
Using the Lost password link to reset your PrestaShop password
The Lost password link is the easiest way to reset your PrestaShop password. When you submit your admin email address, PrestaShop will automatically generate a new password and email it to you.
- Begin by navigating to your PrestaShop admin log in page.
- Under the Log in button, click the Lost password link.
- On the next page, enter in your PrestaShop admin email address and click the Send button.
- After you see the notification that your password has been sent, check your email account for an email with your new PrestaShop admin password.
- Click on the back to login home link on the PrestaShop notification page.
- Your email address should be automatically filled in for you. Input your new password in the Password field and click Log in.
If you would like to change the password to one of your choosing, this can be done within the PrestaShop back office. For step-by-step instructions, please see our tutorial on changing your password in the PrestaShop back office.
Resetting your PrestaShop Password Through the Database
There may be times when you either do not receive the password reset email or PrestaShop has trouble sending the email. Fortunately, there is an alternative for changing the admin password through the PrestaShop database using a _COOKIE_KEY_ from the PrestaShop settings file. The _COOKIE_KEY_ is unique for each PrestaShop installation, so it will need to be retrieved from your PrestaShop files and you cannot use the one shown in this example or one from another PrestaShop store.
- Begin by logging into your cPanel account.
- Before we access the database, we need the _COOKIE_KEY_ from our PrestaShop config/settings.inc.php file. Using the cPanel File Manager, navigate to the folder where you installed PrestaShop (either public_html or a subdirectory of public_html).
- Next, navigate into the config folder inside of this directory where PrestaShop is installed.
- Select the config.inc.php file and open it with the Code Editor or Edit option in File Manager. If an Encoding Check notification pops up, just simply click on the Edit button at the bottom of the window.
- Inside the settings.inc.php file copy the entire string of characters between the single quotes for the _COOKIE_KEY value. You may find it helpful to paste this into a text editor file (using a text editor like Notepad, TextEdit) while you are working through the rest of the steps.
- Close the settings.inc.php file and the File Manager tab.
- Back on the cPanel home page, select the phpMyAdmin icon under the Databases area.
- In phpMyAdmin, select your PrestaShop database name from the menu on the left side of the page.
- Inside your PrestaShop database scroll down the table names shown in the left menu and select the ps_employee table (prefix may vary if you changed this during the PrestaShop installation).
- Click the edit link for your PrestaShop admin user
- In the passwd value field paste in the _COOKIE_KEY value you copied earlier from settings.inc.php, followed by your new password. Do not use the example "NewPassword" shown below. This is only used as a placeholder in this tutorial to show you where to place your new password.
- In the Function column, select MD5 from the drop down menu
- Click the Go button near the bottom of the page.
You've successfully reset your admin password. You can now log into your PrestaShop back office with the new password.