In this tutorial:

The following article tells you how to recover or reset a missing administrator password for the PrestaShop Administrator Dashboard in two ways. It is assumed that you have access to the cPanel and will be using the cPanel File editor to obtain necessary information. We will also use phpMyAdmin to enter and edit the database in the process of resetting a lost admin password.

Using the Lost Password Function

PrestaShop provides a way to recover a lost password at the login screen for the PrestaShop backend. It's simply a link that will send the password back to the email address that is the designated administrator email address. In order to use this method of recovery, you will need to know your email address for the admin login in question.

  1. Type in the URL for the PrestaShop dashboard into your internet browser.
  2. Login Screen for PrestashopBeneath the login blank for your password is a link labeled "Lost password?" Click on this link
  3. Forgot Password Screen for PrestashopYou will then see a small window that will give you the option to type in the Admin address for the password you have forgotten. You will need to know the email address assigned to the administrator login in order to use this recovery method. Type in your email and then click on the SEND button.
  4. Confirmation of email sent for new passwordExample of body of the email sent with new passwordAfter you click on the SEND button you'll see a small pop up Window confirming that the mail was sent. Check administrator email for the new password to login to the Administrator. The email message will come with a subject of "[Your Store Name] Your new password". It will be sent from your store Name.

This method of recovering your password will require that you have access to the administrator email that is assigned to your admin login. If you are unable to receive email or do not know the email used for the administrator login, then the second method of password recovery will be the method you will need to use.

Resetting the Administrator password in the database

This method of pasword recovery will require that you be able to access both the files and the database of your PrestaShop login. The instructions will be using the cPanel File editor and phpMyAdmin in order to obtain the necessary information to reset the password that is stored in the database table.

  1. Login to your cPanel, then go to the FILES section and click on File Manager.
  2. We will need to edit the SETTINGS.INC.PHP file in order to obtain the COOKIE_KEY before we can change the password in the database. Find your PrestaShop installation files using the File Manager. When you are in the files, look for the CONFIG folder and click on it to see the list of files.
  3. In the file list you should see a file labeled settings.inc.php. Right-click then select EDIT or CODE EDITOR to open this file.
  4. When you are in the editor look for the line that begins like this: define('_COOKIE_KEY_'</p>. Copy the string of numbers and letters that is between the single quotation marks. Don't copy the quotation marks! In order to copy it, simply place your mouse pointer at the beginning of the text, left-click, hold the button down and drag to the end of the code. This will highlight the key. Once all of the text is highlighted, release the left button and right-click (control click on a Mac touchpad or one-button mouse) on the highlit text. Select COPY. This will store the text. You can close the file once you have the key copied.

    Note that the key that you copy is unique to this PrestaShop installation. You will not be able to use this key in a different PretaShop installation.

  5. phpMyAdmin iconGo back into the cPanel and then select the phpMyAdmin icon in the DATABASES section.
  6. Once you have phpMyAdmin open, select your PrestaShop database name from the menu on the left side of the page. If you are unfamiliar with your PrestaShop database name then please read this article in order to find it.
  7. When your database opens you will see a long list of tables listed on the lefthand side of the screen. Scroll down the list of table names until you find ps_employee table> Note that this prefix may vary if it was named differently during the installation. The suffix of "_employee" should still remain though. Left-click on the table to open it.
  8. Select EDIT for admin employee IDOnce you have the table opened in the phpMyAdmin editor, you will need to click on EDIT for the Administrator login that you're trying to reset. Please refer to the screenshot at right to see where to find EDIT (it's to the left of the admin login that you're trying to find under Options)
  9. Select the passwd field and clear existing password When you are in the EDIT screen look for the line that starts with the label passwd. This is where the password is stored. You will see the existing value in the field to the right under VALUE. Click in the field, highlight all of the text and clear it with your backspace or delete key.
  10. Next, right click (or control-click on a Mac) in the same field and select PASTE to insert the COOKIE_KEY from the SETTINGS_INC.PHP file from earlier. If you do not see the code that you obtained earlier, please return to steps 1-4 to get the code.
  11. When you have finished placing the code in there, the next step is to type in your new password. There should be NO SPACE in between your password and the COOKIE_KEY. Practice good security by making sure that your password is not something easily determined. For guidelines on creating a good password, please read An Introduction to Password Security.
  12. Click on the drop down menu and select MD5When you have your password typed in, click on the drop-down menu to the left of the value field where you inserted the COOKIE_KEY and typed your password. It will be under the columned labeled FUNCTION. Scroll down the list and look for and select md5.
  13. Select MD5, double-check password and then click on GO to save password changeWhen you have selected md5, double-check to make sure your password is correct in the value field and then click on GO in the bottom left corner of the screen in order to commit the change.

This completes the PrestaShop password reset process using the database. You should be able to now login to the PrestaShop Administrator Dashboard!

Continued Education in Course Prestashop 1.5
You are viewing Section 2: 355: How to Reset the PrestaShop Administrator Password
Section 1: 356: Editing the Customer Reassurance information in Prestashop 1.5
Section 3: 354: Removing the default handling charge in PrestaShop 1.5
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
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.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

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
n/a Points
2014-07-18 11:45 am
If we want to reset password if that we have lost password. And here we have to log in for reset password...
It doesn't make sens...

Resetting the Administrator password in the database

This method of pasword recovery will require that you be able to access both the files and the database of your PrestaShop login. The instructions will be using the cPanel File editor and phpMyAdmin in order to obtain the necessary information to reset the password that is stored in the database table.

Login to your cPanel, then go to the FILES section and click on File Manager.
Staff
8,979 Points
2014-07-18 2:14 pm
Hello Marie,

Thank you for your question. If you cannot access the dashboard for PrestaShop, you can still reset the password in the database, which is in cPanel.

The cPanel (also known as Control Panel) is where you installed/setup PrestaShop.

You can login to cPanel, and reset your cPanel password from AMP.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-08-01 3:48 am

Sorry, i tried but in prestashop 1.6 not work. Field for varchar(32) and i have a cookie key more long.

How can i proceed? Any suggestion?

Thanks

Staff
18,686 Points
2014-08-01 9:13 am
Hello Ivan,

This article is in the PrestaShop 1.5 section so it only it may not work for the new PrestaShop 1.6 version. We do, however, have an article on how to reset your admin password in PrestaShop 1.6. That should get you back on track.

Kindest Regards,
Scott M
n/a Points
2014-09-25 5:45 am

Thanks dude, that solution is so fucking genoius! Solved my problem right on time. You post crap like that thinking here are a bunch of retards and don't know how to click Recover Password. Thank you for your amazing working like a charm solution. PrestaShop sucks because me as admin must wait 360 minutes to reset password and yet it still not working. But YAY! You are super smart.

Staff
18,686 Points
2014-09-25 9:17 am
Hello Milla,

You would be surprised at the number of requests we have for simple solutions. They are far more common than complex ones. This article also goes over how to reset via the database, which is much more complicated. Still, to fix the issue with PrestaShop not allowing you to set the password too soon, do this:

1. Log into the cPanel
2. Click on the phpMyAdmin icon found in the Databases category.
3. Find your specific PrestaShop database and click on the ps_employee table.
4. Locate the desired user in the database, you will see a date field called 'last_passwd_gen'. You can set the date there to something earlier so you can reset the password immediately. I just set it a single day back as it is easiest.
5. Follow instructions above to reset password.

That should help you do it faster if needed. Thank you for your input as we will cover the password regen date change in a future article.

Kindest Regards,
Scott M
n/a Points
2014-08-09 11:40 am
That was incredible!!
n/a Points
2014-08-15 8:15 am
Nice, I could reset my password using the database edit. Which is nice

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

8 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

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: support@InMotionHosting.com
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!