The administrator password can also be recovered through the Prestashop database. This should only be done when the super administrator password has been lost and can only be recovered manually. The following article shows how to manually recover the password in PrestaShop 1.5 using phpMyAdmin.
Manually Creating a New Password in the PrestaShop 1.5 Database
- Start by logging into your Cpanel account.
- You will need to first acquire the Cookie key which can be found in the SETTINGS.PHP file in your PrestaShop installation directory. Open the File Manager in Cpanel and then go to the CONFIG folder found in your PrestaShop 1.5 installation directory. The screenshot below shows the CONFIG folder contents in the column at right:
- Find the SETTINGS.PHP file, then click on it and select EDIT in order to edit the file. Note: we are NOT making changes to this file - we are only recording the D Highlight the cookie key (it will be a long string of numbers and letters) and then right-click on it with your mouse and select COPY. Do not hit a key on your key board when you have the key highlighted, or it will change the file. If you do this accidentally, simply close the file and then re-open it WITHOUT SAVING the file. When you open the SETTINGS.INC.PHP file, you will see the code as per below:
Note that only a portion of the file is showing. The code includes the cookie key for o
- Open a blank text file on your desktop (you can use notepad, or if you're on a Mac, use textedit).
- Right-click in the blank text file and paste the cookie text into it. If you don't use copy and paste for this state, you can always attempt to write down all 55+ characters.
- After having copied the code, you've completed the initial steps. Highlight the cookie key.
- Paste the cookie key into the blank notepad or and then go to the next step. Leave this window open.
- Go back into your CPANEL and then go to the DATABASES section. Click on PHPMYADMIN order to start it up.
- Select the database that is being used for your PrestaShop installation. Click on it, and you will see all of the tables listed for the application. You will need to specifically look for the ps_employee table.
- Click on EDIT for the user where the password must changed. In the password field, copy and paste the COOKIE KEY you copied earlier. Then type in your new password.
- You will next need to go to the FUNCTION column and choose MD5 from the drop-down menu.
- Select GO in order to commit the password change.
This option to change the password bypasses the normal interface and should only be used when you have no other choice. Remember that in order to use this method you will need to have access to the database. Security for all passwords should be considered of utmost importance and you should practice good habits such as regular password changes and longer passwords using a non-familiar combination of letters and numbers.